diff --git a/.github/workflows/data-update_ec2-instance-types.yml b/.github/workflows/data-update_ec2-instance-types.yml new file mode 100644 index 000000000..7dbecd9c8 --- /dev/null +++ b/.github/workflows/data-update_ec2-instance-types.yml @@ -0,0 +1,41 @@ +# Data Update: +# EC2 Instance Types +# +# This Github Action: +# - executes the script that updates the EC2 instance types that come bundled with Moto +# - creates a PR +# +name: "DataUpdate_EC2InstanceTypes" + +on: + schedule: + - cron: '00 12 * * 0' + +jobs: + update: + name: Update EC2 Instance Types + runs-on: ubuntu-latest + permissions: + id-token: write # This is required for requesting the JWT + contents: read # This is required for actions/checkout + + steps: + - name: Checkout repository + uses: actions/checkout@v3 + + - name: Configure AWS + uses: aws-actions/configure-aws-credentials@v1 + with: + role-to-assume: arn:aws:iam::486285699788:role/GithubActionsRole + role-duration-seconds: 60 + + - name: Pull EC2 instance types from AWS + uses: technote-space/create-pr-action@v2 + with: + EXECUTE_COMMANDS: | + scripts/get_instance_info.py + COMMIT_MESSAGE: 'chore: update EC2 Instance Types' + COMMIT_NAME: 'Moto Admin' + COMMIT_EMAIL: 'admin@getmoto.org' + PR_BRANCH_NAME: 'chore-update-${PR_ID}' + PR_TITLE: 'chore: update EC2 Instance Types'