Admin: Automate IAM Managed Policies updates

This commit is contained in:
Bert Blommers 2024-01-18 11:10:09 -01:00 committed by GitHub
parent e3f60e2b1f
commit 4ff56bffb8
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -0,0 +1,43 @@
# Data Update:
# IAM Managed Policies
#
# This Github Action:
# - executes the script that updates the IAM Managed Policies that come bundled with Moto
# - creates a PR
#
name: "DataUpdate_IAMManagedPolicies"
on:
schedule:
- cron: '00 6 1 * *'
workflow_dispatch:
jobs:
update:
name: Update IAM Managed Policies
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: Pull IAM managed policies from AWS
run: |
pip install -r requirements-dev.txt
make aws_managed_policies
- name: Create PR
uses: peter-evans/create-pull-request@v5
with:
branch: 'chore-update-iam-managed-policies-${{ github.run_number }}'
title: 'chore: update IAM Managed Policies'
commit-message: 'chore: update IAM Managed Policies'