Skip to content

Commit

Permalink
Add TEST_SECRET to CD workflows for secure file writing
Browse files Browse the repository at this point in the history
  • Loading branch information
renatodellosso committed Nov 17, 2024
1 parent 5e48381 commit b423436
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
4 changes: 3 additions & 1 deletion .github/workflows/cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ on:
secrets:
GHCR_TOKEN:
required: true
TEST_SECRET:
required: true
workflow_dispatch: # Allows manual triggering of the workflow

jobs:
Expand All @@ -19,7 +21,7 @@ jobs:
uses: docker/setup-buildx-action@v3

- name: Write file
run: echo "test" > test.txt
run: echo "${{ secrets.TEST_SECRET }}" > test.txt

- name: Build and export
uses: docker/build-push-action@v6
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/onpush.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,5 @@ jobs:
- ci
uses: ./.github/workflows/cd.yml
secrets:
GHCR_TOKEN: ${{ secrets.GHCR_TOKEN }}
GHCR_TOKEN: ${{ secrets.GHCR_TOKEN }}
TEST_SECRET: ${{ secrets.TEST_SECRET }}

0 comments on commit b423436

Please sign in to comment.