Skip to content

Commit 1b3bfa1

Browse files
committed
Authenticate pinned corpus CI download
1 parent 66cf726 commit 1b3bfa1

1 file changed

Lines changed: 18 additions & 2 deletions

File tree

.github/workflows/ci.yml

Lines changed: 18 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,15 @@ jobs:
3232
sudo apt-get install --yes clang libssl-dev pkg-config
3333
- name: Fetch and verify the pinned conformance corpus
3434
working-directory: credbind-cpp
35-
run: make fixtures test-fixtures
35+
env:
36+
GH_TOKEN: ${{ secrets.CREDBIND_CROSS_REPO_READ_TOKEN }}
37+
run: |
38+
test -n "$GH_TOKEN" || { echo "CREDBIND_CROSS_REPO_READ_TOKEN must grant read-only access to credbind/spec" >&2; exit 1; }
39+
artifact="$RUNNER_TEMP/credbind-ssh-v1-conformance-v1.0.0-rc.2.tar.gz"
40+
trap 'rm -f "$artifact"' EXIT
41+
gh release download v1.0.0-rc.2 --repo credbind/spec \
42+
--pattern credbind-ssh-v1-conformance-v1.0.0-rc.2.tar.gz --output "$artifact"
43+
CREDBIND_FIXTURE_SOURCE="$artifact" make fixtures test-fixtures
3644
- name: Run strict deterministic and sanitizer gates
3745
working-directory: credbind-cpp
3846
env:
@@ -58,7 +66,15 @@ jobs:
5866
run: echo "PKG_CONFIG_PATH=$(brew --prefix openssl@3)/lib/pkgconfig" >> "$GITHUB_ENV"
5967
- name: Fetch and verify the pinned conformance corpus
6068
working-directory: credbind-cpp
61-
run: make fixtures test-fixtures
69+
env:
70+
GH_TOKEN: ${{ secrets.CREDBIND_CROSS_REPO_READ_TOKEN }}
71+
run: |
72+
test -n "$GH_TOKEN" || { echo "CREDBIND_CROSS_REPO_READ_TOKEN must grant read-only access to credbind/spec" >&2; exit 1; }
73+
artifact="$RUNNER_TEMP/credbind-ssh-v1-conformance-v1.0.0-rc.2.tar.gz"
74+
trap 'rm -f "$artifact"' EXIT
75+
gh release download v1.0.0-rc.2 --repo credbind/spec \
76+
--pattern credbind-ssh-v1-conformance-v1.0.0-rc.2.tar.gz --output "$artifact"
77+
CREDBIND_FIXTURE_SOURCE="$artifact" make fixtures test-fixtures
6278
- name: Run strict, sanitizer and fuzz gates
6379
working-directory: credbind-cpp
6480
run: make check test-readme test-sanitize test-fuzz-smoke

0 commit comments

Comments
 (0)