Skip to content

Add support for AWS China (#14) #9

Add support for AWS China (#14)

Add support for AWS China (#14) #9

Workflow file for this run

name: CI
on:
push:
pull_request:
jobs:
shellcheck:
name: ShellCheck
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Run ShellCheck
uses: ludeeus/action-shellcheck@master
release:
name: Release
runs-on: ubuntu-latest
needs:
- shellcheck
if: startsWith(github.ref, 'refs/tags/v')
steps:
- uses: actions/checkout@v3
- uses: softprops/action-gh-release@v1
with:
files: ./assume-aws-sso-role
formula:
name: Update homebrew formula
runs-on: ubuntu-latest
needs:
- release
if: startsWith(github.ref, 'refs/tags/v')
steps:
- uses: actions/checkout@v3
- name: Update homebrew formula
run: |
# Update formula to latest release
./.github/scripts/update-formula.sh
# Configure git
git config --global user.name assume-aws-sso-role
git config --global user.email [email protected]
git remote set-url origin "https://${GITHUB_ACTOR}:${GITHUB_TOKEN}@github.com/${GITHUB_REPOSITORY}"
# Commit and push changes
git add assume-aws-sso-role.rb
git commit --message "Update homebrew formula"
git push origin HEAD:main
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}