2023-02-13 10:23:30 +00:00
|
|
|
# Data Update:
|
|
|
|
# EC2 Instance Offerings
|
|
|
|
#
|
|
|
|
# This Github Action:
|
|
|
|
# - executes the script that updates the EC2 instance offerings that come bundled with Moto
|
|
|
|
# - creates a PR
|
|
|
|
#
|
|
|
|
name: "DataUpdate_EC2InstanceOfferings"
|
|
|
|
|
|
|
|
on:
|
|
|
|
schedule:
|
2023-02-26 19:44:04 +00:00
|
|
|
- cron: '00 6 * * 0'
|
2023-02-13 10:23:30 +00:00
|
|
|
workflow_dispatch:
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
update:
|
|
|
|
name: Update EC2 Instance Offerings
|
|
|
|
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
|
2023-09-05 17:33:10 +00:00
|
|
|
uses: actions/checkout@v4
|
2023-02-13 10:23:30 +00:00
|
|
|
|
|
|
|
- name: Set up Python 3.9
|
2023-12-11 23:47:25 +00:00
|
|
|
uses: actions/setup-python@v5
|
2023-02-13 10:23:30 +00:00
|
|
|
with:
|
|
|
|
python-version: 3.9
|
|
|
|
|
|
|
|
- name: Configure AWS
|
2023-09-12 09:11:05 +00:00
|
|
|
uses: aws-actions/configure-aws-credentials@v4
|
2023-02-13 10:23:30 +00:00
|
|
|
with:
|
|
|
|
aws-region: us-east-1
|
|
|
|
role-to-assume: arn:aws:iam::486285699788:role/GithubActionsRole
|
|
|
|
|
|
|
|
- name: Pull EC2 instance types from AWS
|
2023-03-10 12:47:42 +00:00
|
|
|
run: |
|
|
|
|
pip install boto3
|
|
|
|
scripts/ec2_get_instance_type_offerings.py
|
|
|
|
- name: Create PR
|
2024-02-06 09:13:18 +00:00
|
|
|
uses: peter-evans/create-pull-request@v6
|
2023-02-13 10:23:30 +00:00
|
|
|
with:
|
2023-03-10 12:47:42 +00:00
|
|
|
branch: 'chore-update-ec2-offerings-${{ github.run_number }}'
|
|
|
|
title: 'chore: update EC2 Instance Offerings'
|
|
|
|
commit-message: 'chore: update EC2 Instance Offerings'
|