Skip to content

Commit 639b898

Browse files
authored
add auto-generated CloudFormation Feature Coverage table (#454)
1 parent 21a52db commit 639b898

File tree

7 files changed

+2530
-517
lines changed

7 files changed

+2530
-517
lines changed

.github/workflows/docs-parity-updates.yml

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -139,12 +139,6 @@ jobs:
139139
python3 -m scripts.create_data_coverage -i target/metrics-implementation-details -r target/metrics-raw -o target/updated_coverage -s src/data/coverage/service_display_name.json
140140
mv -f target/updated_coverage/data/*.json src/data/coverage
141141
142-
- name: Generate CloudFormation Coverage Tables
143-
working-directory: docs
144-
continue-on-error: true
145-
run: |
146-
python3 scripts/create_cfn_coverage_table.py --cfn-json target/iac-catalog-assets/cfn_resources.json
147-
148142
- name: Check for changes
149143
id: check-for-changes
150144
working-directory: docs
Lines changed: 73 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,73 @@
1+
name: Update CloudFormation Coverage
2+
3+
on:
4+
schedule:
5+
- cron: 0 5 * * MON
6+
workflow_dispatch:
7+
inputs:
8+
targetBranch:
9+
required: false
10+
type: string
11+
default: 'main'
12+
13+
jobs:
14+
update-cloudformation-coverage:
15+
name: Update CloudFormation coverage data
16+
runs-on: ubuntu-latest
17+
steps:
18+
- name: Checkout docs
19+
uses: actions/checkout@v4
20+
with:
21+
fetch-depth: 0
22+
path: docs
23+
ref: ${{ github.event.inputs.targetBranch || 'main' }}
24+
25+
- name: Set up Python 3.11
26+
uses: actions/setup-python@v5
27+
with:
28+
python-version: '3.11'
29+
30+
- name: Skip odd weeks on schedule
31+
id: biweekly-gate
32+
env:
33+
EVENT_NAME: ${{ github.event_name }}
34+
run: |
35+
if [ "$EVENT_NAME" = "schedule" ] && [ $((10#$(date +%V) % 2)) -ne 0 ]; then
36+
echo "skip=true" >> "$GITHUB_OUTPUT"
37+
echo "Skipping this scheduled run to maintain biweekly cadence."
38+
else
39+
echo "skip=false" >> "$GITHUB_OUTPUT"
40+
fi
41+
42+
- name: Update CloudFormation coverage data
43+
if: steps.biweekly-gate.outputs.skip != 'true'
44+
working-directory: docs
45+
run: |
46+
python3 scripts/create_cloudformation_coverage.py
47+
env:
48+
NOTION_SECRET: ${{ secrets.NOTION_TOKEN }}
49+
50+
- name: Check for changes
51+
if: steps.biweekly-gate.outputs.skip != 'true'
52+
id: check-for-changes
53+
working-directory: docs
54+
env:
55+
TARGET_BRANCH: ${{ github.event.inputs.targetBranch || 'main' }}
56+
run: |
57+
mkdir -p resources
58+
(git diff --name-only origin/automated-cloudformation-coverage-updates src/data/cloudformation/ 2>/dev/null || git diff --name-only "origin/$TARGET_BRANCH" src/data/cloudformation/ 2>/dev/null) | tee -a resources/diff-check.log
59+
echo "diff-count=$(cat resources/diff-check.log | wc -l)" >> "$GITHUB_OUTPUT"
60+
cat resources/diff-check.log
61+
62+
- name: Create PR
63+
uses: peter-evans/create-pull-request@v7
64+
if: ${{ success() && steps.biweekly-gate.outputs.skip != 'true' && steps.check-for-changes.outputs.diff-count != '0' && steps.check-for-changes.outputs.diff-count != '' }}
65+
with:
66+
path: docs
67+
title: "Update CloudFormation coverage data"
68+
body: "Updating CloudFormation feature coverage data from the Notion resource database."
69+
branch: "automated-cloudformation-coverage-updates"
70+
author: "LocalStack Bot <localstack-bot@users.noreply.github.com>"
71+
committer: "LocalStack Bot <localstack-bot@users.noreply.github.com>"
72+
commit-message: "update generated cloudformation coverage data"
73+
token: ${{ secrets.PRO_ACCESS_TOKEN }}

scripts/create_cfn_coverage_table.py

Lines changed: 0 additions & 252 deletions
This file was deleted.

0 commit comments

Comments
 (0)