File tree Expand file tree Collapse file tree 2 files changed +50
-0
lines changed Expand file tree Collapse file tree 2 files changed +50
-0
lines changed Original file line number Diff line number Diff line change 1+ name : Secrets Testing
2+
3+ on :
4+ push :
5+ branches : [main,build-secrets-testing]
6+ pull_request :
7+ workflow_dispatch :
8+
9+ permissions :
10+ contents : read
11+ packages : write
12+
13+ jobs :
14+ secrets-testing :
15+ name : Secrets Testing
16+ runs-on : ubuntu-latest
17+ steps :
18+ - name : Checkout
19+ uses : actions/checkout@v4
20+
21+ - name : Set up Docker Buildx
22+ uses : docker/setup-buildx-action@v3
23+
24+ - name : Write secret to file
25+ run : |
26+ echo "${{ secrets.NICKLAS_TEST_SECRET }}" > /tmp/test_secret.txt
27+
28+ - name : test secrets
29+ uses : docker/build-push-action@v6
30+ with :
31+ context : .
32+ target : secrets-testing.print
33+ push : false
34+ outputs : type=local,dest=./out
35+ secret-files : |
36+ test_secret=/tmp/test_secret.txt
37+
38+ - name : Print extracted secret
39+ run : |
40+ echo "=== Extracted secret contents ==="
41+ cat ./out/secret.txt
Original file line number Diff line number Diff line change @@ -416,6 +416,15 @@ FROM openfeature-provider-js.test AS openfeature-provider-js.test_e2e
416416RUN --mount=type=secret,id=js_e2e_test_env,target=.env.test \
417417 make test-e2e
418418
419+ # ==============================================================================
420+ # Test Secrets
421+ # ==============================================================================
422+ FROM alpine AS secrets-testing.print
423+
424+ # Never do this at home kids!
425+ RUN --mount=type=secret,id=test_secret,target=/run/secrets/secret.txt \
426+ cp /run/secrets/secret.txt /secret.txt
427+
419428# ==============================================================================
420429# Build OpenFeature Provider
421430# ==============================================================================
You can’t perform that action at this time.
0 commit comments