Skip to content

Commit ce0441b

Browse files
authored
chore: sync with latest template state (#50)
This PR syncs the repository with the latest state from [terraform-module-template](https://github.com/masterpointio/terraform-module-template). **Template Version:** - **Tag:** [v0.8.1](https://github.com/masterpointio/terraform-module-template/releases/tag/v0.8.1) - **Commit SHA:** 9ef513a **Changes include:** - Updated configuration files (.checkov.yaml, .markdownlint.yaml, etc.) - Updated GitHub workflows and templates - Updated linting and formatting configurations - Updated documentation templates
1 parent bc4ef01 commit ce0441b

File tree

3 files changed

+8
-42
lines changed

3 files changed

+8
-42
lines changed

.github/workflows/trunk-upgrade.yaml

Lines changed: 6 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -19,44 +19,10 @@ jobs:
1919
- name: Checkout
2020
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
2121

22-
- name: Create Token for MasterpointBot App
23-
uses: tibdex/github-app-token@3beb63f4bd073e61482598c45c71c1019b59b73a #v2.1.0
24-
id: generate-token
22+
- name: Run Trunk Upgrade
23+
uses: masterpointio/[email protected]
2524
with:
26-
app_id: ${{ secrets.MP_BOT_APP_ID }}
27-
private_key: ${{ secrets.MP_BOT_APP_PRIVATE_KEY }}
28-
29-
- name: Upgrade
30-
id: trunk-upgrade
31-
uses: trunk-io/trunk-action/upgrade@4d5ecc89b2691705fd08c747c78652d2fc806a94 # v1.1.19
32-
with:
33-
github-token: ${{ steps.generate-token.outputs.token }}
34-
reviewers: "@masterpointio/masterpoint-internal"
35-
prefix: "chore: "
36-
37-
- name: Wait for checks to pass + Merge PR
38-
if: steps.trunk-upgrade.outputs.pull-request-number != ''
39-
env:
40-
GH_TOKEN: ${{ steps.generate-token.outputs.token }}
41-
PR_NUMBER: ${{ steps.trunk-upgrade.outputs.pull-request-number }}
42-
run: |
43-
echo "Waiting for required status checks to pass on PR #$PR_NUMBER..."
44-
while true; do
45-
CHECKS_JSON=$(gh pr checks "$PR_NUMBER" --required --json state,bucket)
46-
echo "Current checks status: $CHECKS_JSON"
47-
48-
if echo "$CHECKS_JSON" | jq -e '.[] | select(.bucket=="fail")' > /dev/null; then
49-
echo "One or more required checks have failed. Exiting..."
50-
exit 1
51-
fi
52-
53-
FAILED_OR_PENDING_CHECKS=$(echo "$CHECKS_JSON" | jq '[.[] | select(.state!="SUCCESS" or .bucket!="pass")] | length')
54-
if [ "$FAILED_OR_PENDING_CHECKS" -eq 0 ]; then
55-
echo "All required checks passed. Merging PR https://github.com/${{ github.repository }}/pull/$PR_NUMBER..."
56-
gh pr merge "$PR_NUMBER" --squash --delete-branch --admin
57-
break
58-
else
59-
echo "Some required checks are still running or pending. Retrying in 30s..."
60-
sleep 30
61-
fi
62-
done
25+
app-id: ${{ secrets.MP_BOT_APP_ID }}
26+
app-private-key: ${{ secrets.MP_BOT_APP_PRIVATE_KEY }}
27+
github-token: ${{ secrets.MASTERPOINT_TEAM_PAT }}
28+
reviewers: "@masterpointio/masterpoint-open-source"

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ backend.tf.json
4040

4141
# Other
4242
**/*.backup
43-
***/*.tmp
43+
**/*.tmp
4444
**/*.temp
4545
**/*.bak
4646
**/*.*swp

.trunk/.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,4 @@
66
plugins
77
user_trunk.yaml
88
user.yaml
9-
tmp
9+
tmp

0 commit comments

Comments
 (0)