[fix] rule assertion #46
Workflow file for this run
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: CI | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
branches: | |
- main | |
workflow_dispatch: | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref_name }} | |
cancel-in-progress: true | |
env: | |
AWS_REGION: us-east-1 | |
SAM_CLI_TELEMETRY: '0' | |
STACK_NAME: DO-NOT-DELETE-organization | |
permissions: | |
id-token: write | |
contents: read | |
jobs: | |
deploy: | |
if: github.repository_owner != 'aws-samples' | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 | |
- name: Setup Python | |
uses: actions/setup-python@0b93645e9fea7318ecaed2b359559ac225c90a2b # v5.3.0 | |
with: | |
python-version: '3.13' | |
architecture: x64 | |
cache: pip | |
- name: Setup AWS SAM | |
uses: aws-actions/setup-sam@12a6719db503425e98edcc798b6779590a450e8f # v2 | |
with: | |
use-installer: true | |
- name: Get AWS credentials | |
uses: aws-actions/configure-aws-credentials@010d0da01d0b5a38af31e9c3470dbfdabdecca3a # v4.0.1 | |
with: | |
role-to-assume: ${{ vars.ASSUME_ROLE_ARN }} | |
role-session-name: ci | |
aws-region: ${{ env.AWS_REGION }} | |
#- name: Validate template | |
# run: sam validate --lint | |
- name: Cache SAM build | |
id: cache-sam-build | |
uses: actions/cache@704facf57e6136b1bc63b828d79edcd491f0ee84 # v3 | |
env: | |
cache-name: cache-sam-build | |
with: | |
path: .aws-sam | |
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/requirements.txt') }} | |
restore-keys: | | |
${{ runner.os }}-build-${{ env.cache-name }}- | |
${{ runner.os }}-build- | |
${{ runner.os }}- | |
- name: Run sam build | |
run: sam build --cached --parallel | |
- name: Run sam deploy | |
run: | | |
sam deploy \ | |
--capabilities CAPABILITY_IAM CAPABILITY_NAMED_IAM CAPABILITY_AUTO_EXPAND \ | |
--no-confirm-changeset \ | |
--disable-rollback \ | |
--no-fail-on-empty-changeset \ | |
--no-progressbar \ | |
--parameter-overrides "pGithubOrganization=${{ github.repository_owner }}" \ | |
--role-arn ${{ vars.CF_ROLE_ARN }} \ | |
--stack-name ${{ env.STACK_NAME }} \ | |
--s3-bucket ${{ vars.ARTIFACT_BUCKET }} \ | |
--s3-prefix ${{ github.repository }} \ | |
--tags \ | |
github:org=${{ github.repository_owner }} \ | |
github:repo=${{ github.repository }} \ | |
git:sha=${{ github.sha }} |