Skip to content

Commit 6dc8e11

Browse files
committed
fix(ci): regenerate workflows from pinned Velnor
1 parent f60b4bb commit 6dc8e11

3 files changed

Lines changed: 6 additions & 28 deletions

File tree

‎.github/ci/.github-actions-generator-state‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@ generator 49
77
[outputs]
88
.github/actionlint.yaml ec35f48ae7e90e0e
99
.github/ci/project.toml b19da7b7165e2f66
10-
.github/workflows/ci-main.yml 7b55f4df4a234985
11-
.github/workflows/ci-policy.yml a9a48676140ac8dd
10+
.github/workflows/ci-main.yml 9674edd8e9649bc5
11+
.github/workflows/ci-policy.yml 29d78b9957b5e17f
1212
.github/workflows/ci-pr.yml aa0b4d40949af2ad
1313
.github/workflows/ci-unit-gradle.yml a8a769d0f75f737d
1414
.github/workflows/maintenance.yml 44cdcd6db1e77d43

‎.github/workflows/ci-main.yml‎

Lines changed: 2 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -176,24 +176,13 @@ jobs:
176176
env:
177177
GH_TOKEN: ${{ github.token }}
178178
DEFAULT_BRANCH: main
179-
DECLARED_RULESET_CONTEXTS: DCO,Policy,ci-required
180179
run: |
181180
set -euo pipefail
182-
stderr="$(mktemp)"
183-
trap 'rm -f "$stderr"' EXIT
184-
if contexts="$(gh api "repos/$GITHUB_REPOSITORY/rulesets?includes_parents=true" 2>"$stderr" \
181+
contexts="$(gh api "repos/$GITHUB_REPOSITORY/rulesets?includes_parents=true" \
185182
| jq -r '.[] | select(.target == "branch" and .enforcement == "active") | .id' \
186183
| while read -r id; do gh api "repos/$GITHUB_REPOSITORY/rulesets/$id"; done \
187184
| jq -r --arg branch "refs/heads/$DEFAULT_BRANCH" 'select(.conditions.ref_name.include | any(. == "~DEFAULT_BRANCH" or . == "~ALL" or . == $branch)) | .rules[] | select(.type == "required_status_checks") | .parameters.required_status_checks[].context' \
188-
| sort -u | paste -sd, -)"; then
189-
:
190-
elif grep -qE '(HTTP 403|Upgrade to GitHub Team)' "$stderr"; then
191-
echo "::warning::rulesets API returned 403; falling back to declared contexts [$DECLARED_RULESET_CONTEXTS]"
192-
contexts="$DECLARED_RULESET_CONTEXTS"
193-
else
194-
cat "$stderr" >&2
195-
exit 1
196-
fi
185+
| sort -u | paste -sd, -)"
197186
echo "RULESET_CONTEXTS=$contexts" >> "$GITHUB_ENV"
198187
- name: Enforce workflow policy
199188
env:

‎.github/workflows/ci-policy.yml‎

Lines changed: 2 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -80,24 +80,13 @@ jobs:
8080
env:
8181
GH_TOKEN: ${{ github.token }}
8282
DEFAULT_BRANCH: main
83-
DECLARED_RULESET_CONTEXTS: DCO,Policy,ci-required
8483
run: |
8584
set -euo pipefail
86-
stderr="$(mktemp)"
87-
trap 'rm -f "$stderr"' EXIT
88-
if contexts="$(gh api "repos/$GITHUB_REPOSITORY/rulesets?includes_parents=true" 2>"$stderr" \
85+
contexts="$(gh api "repos/$GITHUB_REPOSITORY/rulesets?includes_parents=true" \
8986
| jq -r '.[] | select(.target == "branch" and .enforcement == "active") | .id' \
9087
| while read -r id; do gh api "repos/$GITHUB_REPOSITORY/rulesets/$id"; done \
9188
| jq -r --arg branch "refs/heads/$DEFAULT_BRANCH" 'select(.conditions.ref_name.include | any(. == "~DEFAULT_BRANCH" or . == "~ALL" or . == $branch)) | .rules[] | select(.type == "required_status_checks") | .parameters.required_status_checks[].context' \
92-
| sort -u | paste -sd, -)"; then
93-
:
94-
elif grep -qE '(HTTP 403|Upgrade to GitHub Team)' "$stderr"; then
95-
echo "::warning::rulesets API returned 403; falling back to declared contexts [$DECLARED_RULESET_CONTEXTS]"
96-
contexts="$DECLARED_RULESET_CONTEXTS"
97-
else
98-
cat "$stderr" >&2
99-
exit 1
100-
fi
89+
| sort -u | paste -sd, -)"
10190
echo "RULESET_CONTEXTS=$contexts" >> "$GITHUB_ENV"
10291
- name: Enforce workflow policy
10392
env:

0 commit comments

Comments
 (0)