-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
60 additions
and
41 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,48 +4,49 @@ on: | |
types: [closed] | ||
branches: | ||
- master | ||
workflow_dispatch: | ||
jobs: | ||
# build: | ||
# if: github.event.pull_request.merged == true && contains(toJSON(github.event.pull_request.labels.*.name), '"autorelease"') | ||
# runs-on: ubuntu-latest | ||
# env: | ||
# manifest_file: 'manifest.yml' | ||
# changelog_file: 'CHANGELOG.md' | ||
# steps: | ||
# - uses: actions/checkout@v2 | ||
# with: | ||
# ref: master | ||
# - name: get version | ||
# id: version | ||
# run: | | ||
# sed -n 's/^version:\s\(.*\)$/\1/p' ${{ env.manifest_file }} | xargs -I {} echo "::set-output name=version::{}" | ||
# - name: get changelog | ||
# id: changelog | ||
# run: | | ||
# changelog=$(echo "${{ steps.version.outputs.version}}" | xargs -I {} sed -n '/^#\s'"{}"'.*$/,/^#\s\([^[:space:]]\+\).*$/{//!p}' ${{ env.changelog_file }}) | ||
# echo $changelog | ||
# changelog="${changelog//'%'/'%25'}" | ||
# changelog="${changelog//$'\n'/'%0A'}" | ||
# changelog="${changelog//$'\r'/'%0D'}" | ||
# echo "::set-output name=changelog::$changelog" | ||
# - name: echo version and changelog | ||
# run: | | ||
# echo "${{ steps.version.outputs.version}}" | ||
# echo "${{ steps.changelog.outputs.changelog }}" | ||
# - name: Create Release | ||
# uses: ncipollo/[email protected] | ||
# with: | ||
# name: ${{ steps.version.outputs.version }} | ||
# tag: v${{ steps.version.outputs.version }} | ||
# body: ${{ steps.changelog.outputs.changelog}} | ||
# draft: false | ||
# prerelease: false | ||
# # An optional tag for the release. If this is omitted the git ref will be used (if it is a tag). | ||
# token: ${{ secrets.GITHUB_TOKEN }} | ||
build: | ||
if: github.event.pull_request.merged == true && contains(toJSON(github.event.pull_request.labels.*.name), '"autorelease"') | ||
runs-on: ubuntu-latest | ||
env: | ||
manifest_file: 'manifest.yml' | ||
changelog_file: 'CHANGELOG.md' | ||
outputs: | ||
output1: ${{ steps.version.outputs.version }} | ||
steps: | ||
- uses: actions/checkout@v2 | ||
with: | ||
ref: master | ||
- name: get version | ||
id: version | ||
run: | | ||
sed -n 's/^version:\s\(.*\)$/\1/p' ${{ env.manifest_file }} | xargs -I {} echo "::set-output name=version::{}" | ||
- name: get changelog | ||
id: changelog | ||
run: | | ||
changelog=$(echo "${{ steps.version.outputs.version}}" | xargs -I {} sed -n '/^#\s'"{}"'.*$/,/^#\s\([^[:space:]]\+\).*$/{//!p}' ${{ env.changelog_file }}) | ||
echo $changelog | ||
changelog="${changelog//'%'/'%25'}" | ||
changelog="${changelog//$'\n'/'%0A'}" | ||
changelog="${changelog//$'\r'/'%0D'}" | ||
echo "::set-output name=changelog::$changelog" | ||
- name: echo version and changelog | ||
run: | | ||
echo "${{ steps.version.outputs.version}}" | ||
echo "${{ steps.changelog.outputs.changelog }}" | ||
- name: Create Release | ||
uses: ncipollo/[email protected] | ||
with: | ||
name: ${{ steps.version.outputs.version }} | ||
tag: v${{ steps.version.outputs.version }} | ||
body: ${{ steps.changelog.outputs.changelog}} | ||
draft: false | ||
prerelease: false | ||
# An optional tag for the release. If this is omitted the git ref will be used (if it is a tag). | ||
token: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
build-and-push-image: | ||
#needs: build | ||
needs: build | ||
runs-on: ubuntu-latest | ||
env: | ||
REGISTRY: ghcr.io | ||
|
@@ -81,6 +82,8 @@ jobs: | |
uses: docker/[email protected] | ||
with: | ||
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }} | ||
tags: | | ||
type=semver,pattern={{version}},value=${{needs.build.outputs.version}} | ||
- name: Build and push Docker image | ||
uses: docker/[email protected] | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,7 +8,7 @@ Here's an example. All options are required except `okta_mfa_method` which defau | |
|
||
```yaml | ||
- name: Create AWS profile | ||
uses: mrchief/aws-creds-okta@master # or a tagged release version | ||
uses: docker://ghcr.io/mrchief/aws-creds-okta@v1.2.1 # or a tagged release version | ||
with: | ||
aws_role_arn: arn:aws:iam::account-id:role/role-name | ||
okta_username: [email protected] | ||
|
@@ -17,6 +17,12 @@ Here's an example. All options are required except `okta_mfa_method` which defau | |
okta_mfa_seed: ${{ secrets.OKTA_MFA_SEED }} | ||
``` | ||
💡 **Note** You can also use the non docker image version of the action by switching to: | ||
``` | ||
uses: mrchief/aws-creds-okta@<tag|sha|branch> | ||
``` | ||
Once this step runs it'll set the following environment variables for subsequent steps: | ||
```shell | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
version: 1.2.0 | ||
version: 1.4.0 |