Skip to content

Commit

Permalink
ghcr_token via env
Browse files Browse the repository at this point in the history
  • Loading branch information
thepwagner committed Dec 18, 2023
1 parent 1125f34 commit 7cc53e2
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion .github/workflows/golang-release.yaml
Expand Up @@ -21,6 +21,8 @@ jobs:
permissions:
contents: read
packages: write
env:
has_ghcr_token: ${{ secrets.ghcr-token != "" }}
steps:
- name: "🌎 Fetching code"
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
Expand All @@ -32,7 +34,7 @@ jobs:
go-version-file: ${{inputs.go-version-file}}
- name: "🐳 Logging in to Docker Registry"
uses: docker/login-action@343f7c4344506bcbf9b4de18042ae17996df046d # v3.0.0
if: ${{ secrets.ghcr-token != "" }}
if: ${{ env.has_ghcr_token }}
with:
registry: ghcr.io
username: ${{ github.actor }}
Expand Down

0 comments on commit 7cc53e2

Please sign in to comment.