From 002ae0f3b5d4b8694dbfabfbc4f9e02576b55de6 Mon Sep 17 00:00:00 2001 From: Nuru Date: Sat, 12 Dec 2020 23:51:45 -0800 Subject: [PATCH 1/2] Use release-drafter to draft release notes --- .github/draft-release.yml | 61 +++++++++++++++++++++++++++++ .github/workflows/draft-release.yml | 19 +++++++++ 2 files changed, 80 insertions(+) create mode 100644 .github/draft-release.yml create mode 100644 .github/workflows/draft-release.yml diff --git a/.github/draft-release.yml b/.github/draft-release.yml new file mode 100644 index 000000000..86b9c3449 --- /dev/null +++ b/.github/draft-release.yml @@ -0,0 +1,61 @@ +name-template: 'v$RESOLVED_VERSION' +tag-template: '$RESOLVED_VERSION' +version-template: '$MAJOR.$MINOR.$PATCH' +version-resolver: + major: + labels: + - 'major' + minor: + labels: + - 'minor' + - 'enhancement' + patch: + labels: + - 'auto-update' + - 'patch' + - 'fix' + - 'bugfix' + - 'bug' + - 'hotfix' + default: 'minor' + +categories: +- title: '🚀 Enhancements' + labels: + - 'enhancement' + - 'patch' + - 'shell' + - 'scripts' + - 'terraform' +- title: '🐛 Bug Fixes' + labels: + - 'fix' + - 'bugfix' + - 'bug' + - 'hotfix' +- title: '🤖 Included Tools' + labels: + - 'auto-update' + - 'packages' + - 'docker' +- title: '🤖 Included Tools' + labels: + - 'auto-update' + - 'packages' + - 'docker' +- title '📚️ Documentation' + labels: + - 'docs' +- title '🏗️ Build/Release Maintenance' + labels: + - 'github' + +change-template: | +
+ $TITLE @$AUTHOR (#$NUMBER) + + $BODY +
+ +template: | + $CHANGES diff --git a/.github/workflows/draft-release.yml b/.github/workflows/draft-release.yml new file mode 100644 index 000000000..a75ad147d --- /dev/null +++ b/.github/workflows/draft-release.yml @@ -0,0 +1,19 @@ +name: draft-release + +on: + push: + branches: + - master + +jobs: + semver: + runs-on: ubuntu-latest + steps: + # Drafts your next Release notes as Pull Requests are merged into "master" + - uses: release-drafter/release-drafter@v5 + with: + publish: false + prerelease: false + config-name: draft-release.yml + env: + GITHUB_TOKEN: ${{ secrets.PUBLIC_REPO_ACCESS_TOKEN }} From dafeceede040b19ed354f6e39666cc5a49e8fec0 Mon Sep 17 00:00:00 2001 From: Nuru Date: Sun, 13 Dec 2020 18:05:58 -0800 Subject: [PATCH 2/2] Suppress "login to assume-role" prompt when role is active --- rootfs/etc/profile.d/aws-okta.sh | 2 +- rootfs/etc/profile.d/aws-vault.sh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/rootfs/etc/profile.d/aws-okta.sh b/rootfs/etc/profile.d/aws-okta.sh index d1e1940ab..e95cee3af 100755 --- a/rootfs/etc/profile.d/aws-okta.sh +++ b/rootfs/etc/profile.d/aws-okta.sh @@ -20,7 +20,7 @@ if [ "${AWS_OKTA_ENABLED}" == "true" ]; then PROMPT_HOOKS+=("aws_okta_prompt") function aws_okta_prompt() { - if [ -z "${AWS_OKTA_PROFILE}" ]; then + if [[ -z "${AWS_OKTA_PROFILE}" && -z "${ASSUME_ROLE}" ]]; then echo -e "-> Run '$(green assume-role)' to login to AWS with aws-okta" fi } diff --git a/rootfs/etc/profile.d/aws-vault.sh b/rootfs/etc/profile.d/aws-vault.sh index bd309d6c2..c975205d0 100755 --- a/rootfs/etc/profile.d/aws-vault.sh +++ b/rootfs/etc/profile.d/aws-vault.sh @@ -204,7 +204,7 @@ if [ "${AWS_VAULT_ENABLED:-true}" == "true" ]; then PROMPT_HOOKS+=("aws_vault_prompt") function aws_vault_prompt() { - if [ -z "${AWS_VAULT}" ]; then + if [[ -z "${AWS_VAULT}" && -z "${ASSUME_ROLE}" ]]; then echo -e "-> Run '$(green assume-role)' to login to AWS with aws-vault" fi }