Skip to content

Commit

Permalink
chore: use docker login reg action for hub/ghcr
Browse files Browse the repository at this point in the history
  • Loading branch information
jevonearth committed Dec 3, 2021
1 parent b5d5c82 commit 44d32c9
Showing 1 changed file with 14 additions and 5 deletions.
19 changes: 14 additions & 5 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -63,11 +63,20 @@ jobs:
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ runner.os }}-go-
- name: Docker Login
env:
DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }}
DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }}
run: echo "${DOCKER_PASSWORD}" | docker login --username "${DOCKER_USERNAME}" --password-stdin
- name: Docker Login to Docker Hub
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}

- name: Docker Login to ghcr.io
uses: docker/login-action@v1
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GH_PAT }}

- name: Run GoReleaser
uses: goreleaser/goreleaser-action@v2
with:
Expand Down

0 comments on commit 44d32c9

Please sign in to comment.