Skip to content

Commit 41ffefd

Browse files
committed
ci(contracts): provide scoped offline reproduction dependencies
Resolve baseline build and the proposed safe YAML parser for C03. Export only public Maven artifacts and distribution, never credentials or settings. Bundle runs only when its workflow changes or is explicitly dispatched.
1 parent d2690ce commit 41ffefd

1 file changed

Lines changed: 42 additions & 0 deletions

File tree

.github/workflows/repro-bundle.yml

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
name: Offline contract reproduction bundle
2+
on:
3+
push:
4+
branches: ['feature/2.0.x-contract-hardening']
5+
paths: ['.github/workflows/repro-bundle.yml']
6+
workflow_dispatch:
7+
permissions:
8+
contents: read
9+
jobs:
10+
bundle:
11+
runs-on: ubuntu-latest
12+
timeout-minutes: 15
13+
steps:
14+
- uses: actions/checkout@v7
15+
- uses: actions/setup-java@v5
16+
with:
17+
distribution: temurin
18+
java-version: '17'
19+
cache: maven
20+
- name: Verify baseline and resolve the proposed safe YAML parser
21+
run: |
22+
bash ./mvnw -B --no-transfer-progress clean verify
23+
bash ./mvnw -B --no-transfer-progress org.apache.maven.plugins:maven-dependency-plugin:3.8.1:get -Dartifact=org.yaml:snakeyaml:2.6
24+
- name: Package only public Maven artifacts and distribution
25+
shell: bash
26+
run: |
27+
mkdir -p repro-bundle
28+
git rev-parse HEAD > repro-bundle/source-head.txt
29+
java -version > repro-bundle/java.txt 2>&1
30+
bash ./mvnw -version > repro-bundle/maven.txt 2>&1
31+
# Never include settings.xml, toolchains.xml, Git credentials or environment dumps.
32+
tar -czf repro-bundle/maven-repository.tar.gz -C "$HOME/.m2" repository
33+
distribution="$(find "$HOME/.m2/wrapper/dists" -type d -name apache-maven-3.9.16 -print -quit)"
34+
test -n "$distribution"
35+
tar -czf repro-bundle/maven-distribution.tar.gz -C "$(dirname "$distribution")" apache-maven-3.9.16
36+
(cd repro-bundle && sha256sum *.tar.gz > SHA256SUMS)
37+
- uses: actions/upload-artifact@v7
38+
with:
39+
name: opencli-offline-repro-${{ github.sha }}
40+
path: repro-bundle
41+
retention-days: 3
42+
if-no-files-found: error

0 commit comments

Comments
 (0)