Skip to content

Commit

Permalink
Fix broken release workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
mfisher87 committed Jul 22, 2023
1 parent 38970f0 commit 700e9e9
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/test-and-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -86,22 +86,22 @@ jobs:
docker build -t "${IMAGE_NAME}:${IMAGE_TAG}" .
- name: "DockerHub login (if `main` or tag)"
if: "github.event_name == 'tag' || (github.event_name == 'push' && github.ref_name == github.event.repository.default_branch)"
if: "github.ref_type == 'tag' || (github.event_name == 'push' && github.ref_name == github.event.repository.default_branch)"
uses: "docker/login-action@v2"
with:
username: "${{secrets.DOCKER_USER}}"
password: "${{secrets.DOCKER_PASS}}"

- name: "GHCR login (if `main` or tag)"
if: "github.event_name == 'tag' || (github.event_name == 'push' && github.ref_name == github.event.repository.default_branch)"
if: "github.ref_type == 'tag' || (github.event_name == 'push' && github.ref_name == github.event.repository.default_branch)"
uses: "docker/login-action@v2"
with:
registry: "ghcr.io"
username: "${{ github.repository_owner }}"
password: "${{ secrets.GITHUB_TOKEN }}"

- name: "Release to DockerHub and GHCR (if `main` or tag)"
if: "github.event_name == 'tag' || (github.event_name == 'push' && github.ref_name == github.event.repository.default_branch)"
if: "github.ref_type == 'tag' || (github.event_name == 'push' && github.ref_name == github.event.repository.default_branch)"
run: |
docker push "${IMAGE_NAME}:${IMAGE_TAG}"
Expand Down

0 comments on commit 700e9e9

Please sign in to comment.