Skip to content

Commit f60b4bb

Browse files
authored
chore: sync velnor-workflow to b9c3156c (#326)
Fleet sync to tailrocks/velnor@b9c3156
1 parent 91c271d commit f60b4bb

8 files changed

Lines changed: 62 additions & 38 deletions

File tree

‎.github-gen/velnor-workflow.toml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
schema = 1
22
[generator]
33
repository = "tailrocks/graphql-java-datetime"
4-
revision = "92c3478694ef423fb4160b8c934d6671ca85b51a"
4+
revision = "b9c3156cdb88e63c11b9e595a3e694b02238c09a"
55
[policy]
66
ruleset_required_status_checks = ["ci-required"]
77
ruleset_external_status_checks = ["DCO"]
Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
11
# Generated ownership state; do not edit.
22
schema = 2
33
[inputs]
4-
config 19d7e033150a74a6
4+
config 28930ca779e6ff5f
55
scan 1b72102e5495def6
6-
generator 48
6+
generator 49
77
[outputs]
88
.github/actionlint.yaml ec35f48ae7e90e0e
99
.github/ci/project.toml b19da7b7165e2f66
10-
.github/workflows/ci-main.yml b58e795b73ac20e3
11-
.github/workflows/ci-policy.yml 8aa45ab903305462
12-
.github/workflows/ci-pr.yml 8ddc0fe584b9d16a
13-
.github/workflows/ci-unit-gradle.yml 8f990d0334ceccc0
14-
.github/workflows/maintenance.yml 12deca93f7bf908c
15-
.github/workflows/nightly.yml 76e5e2bc12a599c6
10+
.github/workflows/ci-main.yml 7b55f4df4a234985
11+
.github/workflows/ci-policy.yml a9a48676140ac8dd
12+
.github/workflows/ci-pr.yml aa0b4d40949af2ad
13+
.github/workflows/ci-unit-gradle.yml a8a769d0f75f737d
14+
.github/workflows/maintenance.yml 44cdcd6db1e77d43
15+
.github/workflows/nightly.yml c73d542eaf687a7e
1616
config/fleet/velnor-host.env d14b419216449423

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

Lines changed: 21 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -58,11 +58,11 @@ jobs:
5858
persist-credentials: false
5959
- name: Set up Velnor workflow runtime
6060
if: ${{ runner.environment == 'github-hosted' }}
61-
uses: tailrocks/velnor/.github/actions/setup-velnor-workflow@92c3478694ef423fb4160b8c934d6671ca85b51a
61+
uses: tailrocks/velnor/.github/actions/setup-velnor-workflow@b9c3156cdb88e63c11b9e595a3e694b02238c09a
6262
with:
63-
rev: 92c3478694ef423fb4160b8c934d6671ca85b51a
63+
rev: b9c3156cdb88e63c11b9e595a3e694b02238c09a
6464
- name: Set trusted workflow policy revision
65-
run: echo "VELNOR_WORKFLOW_POLICY_REVISION=92c3478694ef423fb4160b8c934d6671ca85b51a" >> "$GITHUB_ENV"
65+
run: echo "VELNOR_WORKFLOW_POLICY_REVISION=b9c3156cdb88e63c11b9e595a3e694b02238c09a" >> "$GITHUB_ENV"
6666
- name: Select affected units
6767
id: plan
6868
env:
@@ -79,7 +79,7 @@ jobs:
7979
- name: Prepare Velnor workflow runtime
8080
shell: bash
8181
env:
82-
EXPECTED_REVISION: 92c3478694ef423fb4160b8c934d6671ca85b51a
82+
EXPECTED_REVISION: b9c3156cdb88e63c11b9e595a3e694b02238c09a
8383
run: |
8484
set -euo pipefail
8585
stage="$RUNNER_TEMP/velnor-workflow-runtime"
@@ -97,7 +97,7 @@ jobs:
9797
- name: Publish Velnor workflow runtime
9898
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
9999
with:
100-
name: velnor-workflow-runtime-92c3478694ef423fb4160b8c934d6671ca85b51a-${{ runner.os }}-${{ runner.arch }}
100+
name: velnor-workflow-runtime-b9c3156cdb88e63c11b9e595a3e694b02238c09a-${{ runner.os }}-${{ runner.arch }}
101101
path: ${{ runner.temp }}/velnor-workflow-runtime
102102
if-no-files-found: error
103103
retention-days: 7
@@ -147,7 +147,7 @@ jobs:
147147
with:
148148
backend: github
149149
version: 1.11.1
150-
cache-key: velnor-policy-mbx-1.11.1-${{ runner.os }}-${{ runner.arch }}-92c3478694ef423fb4160b8c934d6671ca85b51a
150+
cache-key: velnor-policy-mbx-1.11.1-${{ runner.os }}-${{ runner.arch }}-b9c3156cdb88e63c11b9e595a3e694b02238c09a
151151
restore-keys: |
152152
velnor-policy-mbx-1.11.1-${{ runner.os }}-${{ runner.arch }}-
153153
- name: Install pinned Velnor workflow runtime
@@ -167,7 +167,7 @@ jobs:
167167
cargo install \
168168
--locked \
169169
--git https://github.com/tailrocks/velnor \
170-
--rev 92c3478694ef423fb4160b8c934d6671ca85b51a \
170+
--rev b9c3156cdb88e63c11b9e595a3e694b02238c09a \
171171
--root "$VELNOR_WORKFLOW_ROOT" \
172172
velnor-workflow \
173173
--bin velnor-workflow
@@ -176,20 +176,31 @@ jobs:
176176
env:
177177
GH_TOKEN: ${{ github.token }}
178178
DEFAULT_BRANCH: main
179+
DECLARED_RULESET_CONTEXTS: DCO,Policy,ci-required
179180
run: |
180181
set -euo pipefail
181-
contexts="$(gh api "repos/$GITHUB_REPOSITORY/rulesets?includes_parents=true" \
182+
stderr="$(mktemp)"
183+
trap 'rm -f "$stderr"' EXIT
184+
if contexts="$(gh api "repos/$GITHUB_REPOSITORY/rulesets?includes_parents=true" 2>"$stderr" \
182185
| jq -r '.[] | select(.target == "branch" and .enforcement == "active") | .id' \
183186
| while read -r id; do gh api "repos/$GITHUB_REPOSITORY/rulesets/$id"; done \
184187
| 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' \
185-
| sort -u | paste -sd, -)"
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
186197
echo "RULESET_CONTEXTS=$contexts" >> "$GITHUB_ENV"
187198
- name: Enforce workflow policy
188199
env:
189200
WORKFLOW_ROOT: ${{ github.workspace }}/policy-checkout
190201
HEAD_SHA: ${{ github.event.pull_request.head.sha || github.sha }}
191202
BASE_SHA: ${{ github.event.pull_request.base.sha || github.sha }}
192-
VELNOR_WORKFLOW_POLICY_REVISION: 92c3478694ef423fb4160b8c934d6671ca85b51a
203+
VELNOR_WORKFLOW_POLICY_REVISION: b9c3156cdb88e63c11b9e595a3e694b02238c09a
193204
run: |
194205
set -euo pipefail
195206
velnor-workflow policy \

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

Lines changed: 16 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ jobs:
5151
with:
5252
backend: github
5353
version: 1.11.1
54-
cache-key: velnor-policy-mbx-1.11.1-${{ runner.os }}-${{ runner.arch }}-92c3478694ef423fb4160b8c934d6671ca85b51a
54+
cache-key: velnor-policy-mbx-1.11.1-${{ runner.os }}-${{ runner.arch }}-b9c3156cdb88e63c11b9e595a3e694b02238c09a
5555
restore-keys: |
5656
velnor-policy-mbx-1.11.1-${{ runner.os }}-${{ runner.arch }}-
5757
- name: Install pinned Velnor workflow runtime
@@ -71,7 +71,7 @@ jobs:
7171
cargo install \
7272
--locked \
7373
--git https://github.com/tailrocks/velnor \
74-
--rev 92c3478694ef423fb4160b8c934d6671ca85b51a \
74+
--rev b9c3156cdb88e63c11b9e595a3e694b02238c09a \
7575
--root "$VELNOR_WORKFLOW_ROOT" \
7676
velnor-workflow \
7777
--bin velnor-workflow
@@ -80,20 +80,31 @@ jobs:
8080
env:
8181
GH_TOKEN: ${{ github.token }}
8282
DEFAULT_BRANCH: main
83+
DECLARED_RULESET_CONTEXTS: DCO,Policy,ci-required
8384
run: |
8485
set -euo pipefail
85-
contexts="$(gh api "repos/$GITHUB_REPOSITORY/rulesets?includes_parents=true" \
86+
stderr="$(mktemp)"
87+
trap 'rm -f "$stderr"' EXIT
88+
if contexts="$(gh api "repos/$GITHUB_REPOSITORY/rulesets?includes_parents=true" 2>"$stderr" \
8689
| jq -r '.[] | select(.target == "branch" and .enforcement == "active") | .id' \
8790
| while read -r id; do gh api "repos/$GITHUB_REPOSITORY/rulesets/$id"; done \
8891
| 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' \
89-
| sort -u | paste -sd, -)"
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
90101
echo "RULESET_CONTEXTS=$contexts" >> "$GITHUB_ENV"
91102
- name: Enforce workflow policy
92103
env:
93104
WORKFLOW_ROOT: ${{ github.workspace }}/policy-checkout
94105
HEAD_SHA: ${{ github.event.pull_request.head.sha || github.sha }}
95106
BASE_SHA: ${{ github.event.pull_request.base.sha || github.sha }}
96-
VELNOR_WORKFLOW_POLICY_REVISION: 92c3478694ef423fb4160b8c934d6671ca85b51a
107+
VELNOR_WORKFLOW_POLICY_REVISION: b9c3156cdb88e63c11b9e595a3e694b02238c09a
97108
run: |
98109
set -euo pipefail
99110
velnor-workflow policy \

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

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -57,11 +57,11 @@ jobs:
5757
persist-credentials: false
5858
- name: Set up Velnor workflow runtime
5959
if: ${{ runner.environment == 'github-hosted' }}
60-
uses: tailrocks/velnor/.github/actions/setup-velnor-workflow@92c3478694ef423fb4160b8c934d6671ca85b51a
60+
uses: tailrocks/velnor/.github/actions/setup-velnor-workflow@b9c3156cdb88e63c11b9e595a3e694b02238c09a
6161
with:
62-
rev: 92c3478694ef423fb4160b8c934d6671ca85b51a
62+
rev: b9c3156cdb88e63c11b9e595a3e694b02238c09a
6363
- name: Set trusted workflow policy revision
64-
run: echo "VELNOR_WORKFLOW_POLICY_REVISION=92c3478694ef423fb4160b8c934d6671ca85b51a" >> "$GITHUB_ENV"
64+
run: echo "VELNOR_WORKFLOW_POLICY_REVISION=b9c3156cdb88e63c11b9e595a3e694b02238c09a" >> "$GITHUB_ENV"
6565
- name: Select affected units
6666
id: plan
6767
env:
@@ -78,7 +78,7 @@ jobs:
7878
- name: Prepare Velnor workflow runtime
7979
shell: bash
8080
env:
81-
EXPECTED_REVISION: 92c3478694ef423fb4160b8c934d6671ca85b51a
81+
EXPECTED_REVISION: b9c3156cdb88e63c11b9e595a3e694b02238c09a
8282
run: |
8383
set -euo pipefail
8484
stage="$RUNNER_TEMP/velnor-workflow-runtime"
@@ -96,7 +96,7 @@ jobs:
9696
- name: Publish Velnor workflow runtime
9797
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
9898
with:
99-
name: velnor-workflow-runtime-92c3478694ef423fb4160b8c934d6671ca85b51a-${{ runner.os }}-${{ runner.arch }}
99+
name: velnor-workflow-runtime-b9c3156cdb88e63c11b9e595a3e694b02238c09a-${{ runner.os }}-${{ runner.arch }}
100100
path: ${{ runner.temp }}/velnor-workflow-runtime
101101
if-no-files-found: error
102102
retention-days: 7

‎.github/workflows/ci-unit-gradle.yml‎

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -124,12 +124,12 @@ jobs:
124124
- name: Download Velnor workflow runtime
125125
uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
126126
with:
127-
name: velnor-workflow-runtime-92c3478694ef423fb4160b8c934d6671ca85b51a-${{ runner.os }}-${{ runner.arch }}
127+
name: velnor-workflow-runtime-b9c3156cdb88e63c11b9e595a3e694b02238c09a-${{ runner.os }}-${{ runner.arch }}
128128
path: .velnor-workflow-runtime
129129
- name: Verify Velnor workflow runtime
130130
shell: bash
131131
env:
132-
EXPECTED_REVISION: 92c3478694ef423fb4160b8c934d6671ca85b51a
132+
EXPECTED_REVISION: b9c3156cdb88e63c11b9e595a3e694b02238c09a
133133
run: |
134134
set -euo pipefail
135135
manifest=.velnor-workflow-runtime/manifest.json
@@ -143,7 +143,7 @@ jobs:
143143
- name: Add Velnor workflow runtime to PATH
144144
shell: bash
145145
env:
146-
EXPECTED_REVISION: 92c3478694ef423fb4160b8c934d6671ca85b51a
146+
EXPECTED_REVISION: b9c3156cdb88e63c11b9e595a3e694b02238c09a
147147
run: |
148148
set -euo pipefail
149149
home="$RUNNER_TEMP/velnor-workflow-runtime-artifact"
@@ -298,7 +298,7 @@ jobs:
298298
fi
299299
- name: Report phase timings and cache outcomes
300300
if: always()
301-
uses: ./.github/actions/report-velnor-ci-outcomes
301+
uses: tailrocks/velnor/.github/actions/report-velnor-ci-outcomes@b9c3156cdb88e63c11b9e595a3e694b02238c09a
302302
with:
303303
job_label: ${{ inputs.unit }}
304304
ci_lane: github
@@ -479,7 +479,7 @@ jobs:
479479
fi
480480
- name: Report phase timings and cache outcomes
481481
if: always()
482-
uses: ./.github/actions/report-velnor-ci-outcomes
482+
uses: tailrocks/velnor/.github/actions/report-velnor-ci-outcomes@b9c3156cdb88e63c11b9e595a3e694b02238c09a
483483
with:
484484
job_label: ${{ inputs.unit }}
485485
ci_lane: velnor

‎.github/workflows/maintenance.yml‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ jobs:
7979
run: |
8080
set -euo pipefail
8181
for workflow in ci-main.yml nightly.yml; do
82-
if [[ "$(gh run list --workflow "$workflow" --status in_progress --limit 1 --json databaseId --jq 'length')" != "0" ]]; then
82+
if [[ "$(gh run list --repo "$GITHUB_REPOSITORY" --workflow "$workflow" --status in_progress --limit 1 --json databaseId --jq 'length')" != "0" ]]; then
8383
echo "skip=true" >> "$GITHUB_OUTPUT"
8484
echo "$workflow is in_progress; skipping cache retention" >> "$GITHUB_STEP_SUMMARY"
8585
exit 0
@@ -88,12 +88,12 @@ jobs:
8888
echo "skip=false" >> "$GITHUB_OUTPUT"
8989
- name: Set up Velnor workflow runtime
9090
if: ${{ steps.retention-gate.outputs.skip != 'true' && runner.environment == 'github-hosted' }}
91-
uses: tailrocks/velnor/.github/actions/setup-velnor-workflow@92c3478694ef423fb4160b8c934d6671ca85b51a
91+
uses: tailrocks/velnor/.github/actions/setup-velnor-workflow@b9c3156cdb88e63c11b9e595a3e694b02238c09a
9292
with:
93-
rev: 92c3478694ef423fb4160b8c934d6671ca85b51a
93+
rev: b9c3156cdb88e63c11b9e595a3e694b02238c09a
9494
- name: Set trusted workflow policy revision
9595
if: steps.retention-gate.outputs.skip != 'true'
96-
run: echo "VELNOR_WORKFLOW_POLICY_REVISION=92c3478694ef423fb4160b8c934d6671ca85b51a" >> "$GITHUB_ENV"
96+
run: echo "VELNOR_WORKFLOW_POLICY_REVISION=b9c3156cdb88e63c11b9e595a3e694b02238c09a" >> "$GITHUB_ENV"
9797
- name: Sweep closed-PR merge-ref caches
9898
if: steps.retention-gate.outputs.skip != 'true'
9999
env:

‎.github/workflows/nightly.yml‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,7 @@ jobs:
5757
- name: Dispatch ci-main on default branch
5858
env:
5959
GH_TOKEN: ${{ github.token }}
60+
GITHUB_REPOSITORY: ${{ github.repository }}
6061
DEFAULT_BRANCH: main
6162
DISPATCH_RUNNER: ${{ github.event.inputs.runner || 'both' }}
6263
DISPATCH_SCOPE: ${{ github.event.inputs.scope || 'full' }}
@@ -65,6 +66,7 @@ jobs:
6566
run: |
6667
set -euo pipefail
6768
gh workflow run ci-main.yml \
69+
-R "$GITHUB_REPOSITORY" \
6870
--ref "$DEFAULT_BRANCH" \
6971
-f runner="$DISPATCH_RUNNER" \
7072
-f scope="$DISPATCH_SCOPE" \

0 commit comments

Comments
 (0)