Skip to content

Commit

Permalink
Conditional dockerhub and quay.io push
Browse files Browse the repository at this point in the history
  • Loading branch information
dmunozv04 committed Nov 12, 2024
1 parent 46ad84b commit ec28f14
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions .github/workflows/docker_ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,10 @@ jobs:
id: meta
uses: docker/metadata-action@v5
with:
images: fiware/wirecloud, quay.io/fiware/wirecloud
images: |
${{ env.DOCKERHUB_USERNAME && env.DOCKERHUB_TOKEN && 'fiware/wirecloud }}' || '' }}
${{ env.QUAY_USERNAME && env.QUAY_TOKEN && 'quay.io/fiware/wirecloud' || '' }}
ghcr.io/${{ github.repository }}
# https://github.com/docker/setup-qemu-action
- name: Set up QEMU
Expand Down Expand Up @@ -60,13 +63,13 @@ jobs:
}
- name: Login to DockerHub
if: github.event_name != 'pull_request'
if: github.event_name != 'pull_request' && env.DOCKERHUB_USERNAME && env.DOCKERHUB_TOKEN
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Login to Quay.io
if: github.event_name != 'pull_request'
if: github.event_name != 'pull_request' && env.QUAY_USERNAME && env.QUAY_TOKEN
uses: docker/login-action@v3
with:
registry: quay.io
Expand Down

0 comments on commit ec28f14

Please sign in to comment.