52 lines
1.4 KiB
YAML
52 lines
1.4 KiB
YAML
|
# Data Update:
|
||
|
# SSM default AMIs
|
||
|
#
|
||
|
# This Github Action:
|
||
|
# - executes the script that updates the SSM default AMI's that come bundled with Moto
|
||
|
# - creates a PR
|
||
|
#
|
||
|
name: "DataUpdate_SSMdefaultAMIs"
|
||
|
|
||
|
on:
|
||
|
schedule:
|
||
|
- cron: '00 12 * * 0'
|
||
|
workflow_dispatch:
|
||
|
|
||
|
jobs:
|
||
|
update:
|
||
|
name: Update SSM default AMIs
|
||
|
runs-on: ubuntu-latest
|
||
|
if: ${{ github.ref == 'refs/heads/master' && github.repository == 'getmoto/moto' }}
|
||
|
permissions:
|
||
|
id-token: write
|
||
|
contents: write
|
||
|
pull-requests: write
|
||
|
|
||
|
steps:
|
||
|
- name: Checkout repository
|
||
|
uses: actions/checkout@v3
|
||
|
|
||
|
- name: Set up Python 3.9
|
||
|
uses: actions/setup-python@v4
|
||
|
with:
|
||
|
python-version: 3.9
|
||
|
|
||
|
- name: Configure AWS
|
||
|
uses: aws-actions/configure-aws-credentials@v1
|
||
|
with:
|
||
|
aws-region: us-east-1
|
||
|
role-to-assume: arn:aws:iam::486285699788:role/GithubActionsRole
|
||
|
|
||
|
- name: Pull SSM default AMIs from AWS
|
||
|
uses: technote-space/create-pr-action@v2
|
||
|
with:
|
||
|
GITHUB_TOKEN: ${{ secrets.PR_ACCESS_TOKEN }}
|
||
|
EXECUTE_COMMANDS: |
|
||
|
pip install boto3
|
||
|
python scripts/ssm_get_default_amis.py
|
||
|
COMMIT_MESSAGE: "chore: update SSM default AMI's"
|
||
|
COMMIT_NAME: 'Moto Admin'
|
||
|
COMMIT_EMAIL: 'admin@getmoto.org'
|
||
|
PR_BRANCH_NAME: 'chore-update-${PR_ID}'
|
||
|
PR_TITLE: "chore: update SSM Instance AMI's"
|