Skip to content

Commit

Permalink
Add if statements
Browse files Browse the repository at this point in the history
  • Loading branch information
jennydaman committed Oct 12, 2023
1 parent 8af2e44 commit db31243
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -131,21 +131,21 @@ jobs:
done
- name: Login to DockerHub
id: dockerhub_login
if: (github.event_name == 'push' || github.event_name == 'release') && contains(steps.info.outputs.tags_csv, 'docker.io')
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_PASSWORD }}

- name: Login to GitHub Container Registry
if: (github.event_name == 'push' || github.event_name == 'release') && contains(steps.info.outputs.tags_csv, 'ghcr.io')
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and push
uses: docker/build-push-action@v3
if: github.event_name == 'push' || github.event_name == 'release'
if: (github.event_name == 'push' || github.event_name == 'release')
with:
context: .
file: ./Dockerfile
Expand All @@ -157,6 +157,7 @@ jobs:

- name: Upload ChRIS Plugin
id: upload
if: github.ref_type == 'tag'
uses: FNNDSC/upload-chris-plugin@v1
with:
dock_image: ${{ steps.info.outputs.local_tag }}
Expand All @@ -166,6 +167,7 @@ jobs:
compute_names: host,galena

- name: Update DockerHub description
if: steps.upload.outcome == 'success'
uses: peter-evans/dockerhub-description@v3
continue-on-error: true # it is not crucial that this works
with:
Expand Down

0 comments on commit db31243

Please sign in to comment.