-
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
50 lines (44 loc) · 1.28 KB
/
data-update_ssm-default-amis.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
# 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 10 1 * *'
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@v4
- name: Set up Python 3.9
uses: actions/setup-python@v5
with:
python-version: 3.9
- name: Configure AWS
uses: aws-actions/configure-aws-credentials@v4
with:
aws-region: us-east-1
role-to-assume: arn:aws:iam::682283128318:role/GithubActionsRole
- name: Pull SSM default AMIs from AWS
run: |
pip install boto3
pip install moto[all]
python scripts/ssm_get_default_amis.py
- name: Create PR
uses: peter-evans/create-pull-request@v7
with:
branch: 'chore-update-ssm-amis-${{ github.run_number }}'
title: "chore: update SSM Instance AMI's"
commit-message: "chore: update SSM default AMI's"