Merge pull request #17 from ryanrigato/dev #11
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: application pipeline | |
on: | |
push: | |
branches: | |
- master | |
- dev | |
jobs: | |
run-build-test: | |
runs-on: ubuntu-latest | |
permissions: | |
contents: read | |
id-token: write | |
name: Build and tests application code and updates archives to s3 | |
steps: | |
# confirms the value of ${{vars.PROJECT_NAME}} is 'tvratings' | |
- name: validate-project-name | |
run: | | |
set -e | |
if [ "${{vars.PROJECT_NAME}}" != 'tvratings' ]; then | |
echo "Project name is not 'tvratings'" | |
exit 1 | |
fi | |
- name: checkout-current-branch | |
uses: actions/checkout@v4 | |
- name: set-up-python-runtime | |
uses: actions/setup-python@v2 | |
with: | |
python-version: 3.11 | |
- name: make-scripts-executable | |
run: | | |
chmod +x 'scripts/tvratings_build_test.sh' | |
- name: assume-github-actions-role | |
uses: aws-actions/configure-aws-credentials@v4 | |
with: | |
audience: sts.amazonaws.com | |
aws-region: ${{vars.DEFAULT_AWS_REGION}} | |
role-to-assume: arn:aws:iam::${{secrets.AWS_ACCOUNT_ID}}:role/${{secrets.PIPELINE_ROLE_NAME}} | |
- name: test-and-build-deployment-archive | |
shell: bash | |
env: | |
AWS_ACCOUNT_ID: ${{secrets.AWS_ACCOUNT_ID}} | |
run: 'scripts/tvratings_build_test.sh' |