DataUpdate_EC2InstanceTypes #23
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
# 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 8 * * 0' | |
jobs: | |
update: | |
name: Update EC2 Instance Types | |
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@v2 | |
with: | |
aws-region: us-east-1 | |
role-to-assume: arn:aws:iam::486285699788:role/GithubActionsRole | |
- name: Pull EC2 instance types from AWS | |
run: | | |
pip install boto3 | |
scripts/get_instance_info.py | |
- name: Create PR | |
uses: peter-evans/create-pull-request@v5 | |
with: | |
branch: 'chore-update-ec2-types-${{ github.run_number }}' | |
title: 'chore: update EC2 Instance Types' | |
commit-message: 'chore: update EC2 Instance Types' |