|
| 1 | +name: Automated Maintenance v1 |
| 2 | +on: |
| 3 | + schedule: |
| 4 | + - cron: '0 0,6,12,18 * * *' |
| 5 | + workflow_dispatch: # Enables on-demand/manual triggering: https://docs.github.com/en/free-pro-team@latest/actions/managing-workflow-runs/manually-running-a-workflow |
| 6 | +jobs: |
| 7 | + job: |
| 8 | + runs-on: ubuntu-latest |
| 9 | + steps: |
| 10 | + - uses: actions/checkout@v4 |
| 11 | + with: |
| 12 | + ref: 'v1' |
| 13 | + - uses: actions/setup-python@v5 |
| 14 | + with: |
| 15 | + python-version: 3 |
| 16 | + - |
| 17 | + id: maintenance |
| 18 | + run: | |
| 19 | + latest_sam_cli=`curl -s https://api.github.com/repos/aws/aws-sam-cli/releases/latest | jq -r .tag_name | cut -c 2-` |
| 20 | + latest=`curl "https://pypi.org/pypi/aws-sam-cli/$latest_sam_cli/json" -s | jq -r '.info.requires_dist[] | select(contains("aws-sam-translator"))' | cut -c 21-` |
| 21 | + sed -i -E "s/aws-sam-translator>=[0-9.]+/aws-sam-translator>=$latest/" setup.py |
| 22 | + pip install -e . |
| 23 | + rm -rf src/cfnlint/data/DownloadsMetadata/* |
| 24 | + cfn-lint --update-iam-policies |
| 25 | + cfn-lint --update-documentation |
| 26 | + scripts/update_specs_services_from_ssm.py |
| 27 | + scripts/update_specs_from_pricing.py |
| 28 | + scripts/update_serverless_aws_policies.py |
| 29 | + scripts/update_schemas_from_aws_api.py |
| 30 | + cfn-lint --update-specs |
| 31 | + echo "date=$(date +'%Y-%m-%d')" >> $GITHUB_OUTPUT |
| 32 | + env: |
| 33 | + AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} |
| 34 | + AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} |
| 35 | + - uses: peter-evans/create-pull-request@v6 |
| 36 | + with: |
| 37 | + branch: v1 |
| 38 | + commit-message: | |
| 39 | + Update CloudFormation schemas to ${{ steps.maintenance.outputs.date }} |
| 40 | + body: | |
| 41 | + - Update CloudFormation schemas to ${{ steps.maintenance.outputs.date }} |
| 42 | + - Update Specs from pricing data as of ${{ steps.maintenance.outputs.date }} |
| 43 | +
|
| 44 | + Automated changes by [create-pull-request](https://github.com/peter-evans/create-pull-request) GitHub action |
| 45 | + delete-branch: true |
| 46 | + title: chore(schemas) - Update CloudFormation schemas to ${{ steps.maintenance.outputs.date }} |
0 commit comments