Skip to content

Commit

Permalink
ci: add Artifactory registry credentials to workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
cjdcordeiro committed Aug 15, 2023
1 parent 8fe6a9d commit cc37129
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -378,10 +378,14 @@ jobs:
name: Login to GHCR
if: needs.release-base.outputs.push == 'push'
uses: docker/login-action@v2
env:
REGISTRY: ${{ startsWith(github.ref, 'refs/tags/v') && secrets.ARTIFACTORY_REGISTRY || 'ghcr.io' }}
USERNAME: ${{ startsWith(github.ref, 'refs/tags/v') && secrets.ARTIFACTORY_USER || github.actor }}
PASSWORD: ${{ startsWith(github.ref, 'refs/tags/v') && secrets.ARTIFACTORY_ACCESS_TOKEN || secrets.GITHUB_TOKEN }}
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
registry: ${{ env.REGISTRY }}
username: ${{ env.USERNAME }}
password: ${{ env.PASSWORD }}
-
name: Build local image for testing
run: |
Expand Down

0 comments on commit cc37129

Please sign in to comment.