From 3821a0cc822541a02f476d5dbeabd771c6936598 Mon Sep 17 00:00:00 2001 From: Carl Benson Date: Wed, 5 Jun 2024 13:10:23 -0400 Subject: [PATCH] Fix rule pack info update automation --- .github/workflows/update-rule-pack-info.yaml | 25 +++++++++++++++----- 1 file changed, 19 insertions(+), 6 deletions(-) diff --git a/.github/workflows/update-rule-pack-info.yaml b/.github/workflows/update-rule-pack-info.yaml index f7edb02..82a6c56 100644 --- a/.github/workflows/update-rule-pack-info.yaml +++ b/.github/workflows/update-rule-pack-info.yaml @@ -1,31 +1,44 @@ name: Update Rule Pack Info on: + schedule: + - cron: '0 0 1,15 * *' workflow_dispatch: jobs: update-rule-packs: name: Update Rule Packs - runs-n: ubuntu-latest + runs-on: ubuntu-latest steps: - name: Checkout code uses: actions/checkout@v4 + - name: Update packs id: update-packs run: | cd scripts pip install -r requirements.txt - cd lib - python rule_pack_info_generator.py + python index.py update-rule-packs + + - name: Get changed files + id: changed-files + uses: tj-actions/changed-files@v44 + with: + files: "files/*" + + - name: List all changed files + run: echo '${{ steps.changed-files.outputs.all_changed_files }}' + - name: Create Pull Request uses: peter-evans/create-pull-request@v6 with: token: ${{ secrets.GITHUB_TOKEN }} base: main - branch: update-rule-pack-info - commit-message: Update Conformance Packs rule info + branch: auto-update-rule-pack-info + add-paths: files/* + commit-message: Automatic updates to Conformance Packs rule info delete-branch: true - title: 'Update Conformance Packs Rule Info' + title: '[Auto] Update Conformance Packs Rule Info' body: | Update the available list of rules in the Conformance Packs maintained by [awslabs/aws-config-rules](https://github.com/awslabs/aws-config-rules). assignees: bensonce