🐛 Quick Fix #8
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
name: 🥞 Stackery Agent Commander | |
on: | |
push: | |
branches: | |
- main | |
permissions: | |
actions: write | |
contents: read | |
defaults: | |
run: | |
shell: bash | |
jobs: | |
deploy: | |
name: 🚀 Deploy 🥞 Stackery Commander | |
runs-on: ubuntu-latest | |
permissions: | |
id-token: write | |
contents: read | |
steps: | |
- name: ⬇️ Checkout repo | |
uses: actions/checkout@v2 | |
- name: 🔶 Set environment for branch | |
id: environment-set-up | |
run: | | |
if [[ $GITHUB_REF == 'refs/heads/main' ]]; | |
then echo '::set-output name=ENV::prod' | |
else echo '::set-output name=ENV::stage' | |
fi | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-python@v4 | |
with: | |
python-version: "3.8" | |
- uses: aws-actions/setup-sam@v2 | |
with: | |
use-installer: true | |
- uses: aws-actions/configure-aws-credentials@v1 | |
with: | |
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }} | |
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }} | |
aws-region: us-east-1 | |
- name: 🚀 🥞 Stackery | |
run: | | |
sam build -t infrastructure/template.yaml | |
sam deploy --no-confirm-changeset --no-fail-on-empty-changeset --stack-name stackmon --s3-bucket stackmon-build-files --s3-prefix utils/stackery --capabilities CAPABILITY_IAM CAPABILITY_NAMED_IAM --region us-east-1 |