Skip to content

Commit

Permalink
ci(ct-base): switch some steps to run on push or schedule IQSS#8932
Browse files Browse the repository at this point in the history
Instead of only running the steps to push images to Docker Hub
on a Git push event, also make it possible to run them an anything
not being a pull_request event. (Like a schedule)
  • Loading branch information
poikilotherm committed Nov 4, 2022
1 parent e261e37 commit 5d77ab9
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/container_base_push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,18 +53,18 @@ jobs:
- name: Build base container image with local architecture
run: mvn -f modules/container-base -Pct package

- if: ${{ github.event_name == 'push' }} # run only if this is a push - PRs have no access to secrets
- if: ${{ github.event_name != 'pull_request' }} # run only if this is not a pull request - PRs have no access to secrets
name: Log in to the Container registry
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- if: ${{ github.event_name == 'push' }} # run only if this is a push - multi-arch makes no sense with PR
- if: ${{ github.event_name != 'pull_request' }} # run only if this is not a pull request - multi-arch makes no sense with PR
name: Set up QEMU for multi-arch builds
uses: docker/setup-qemu-action@v2
- name: Re-set image tag based on branch
if: ${{ github.ref == 'master' }}
run: echo "IMAGE_TAG=release"
- if: ${{ github.event_name == 'push' }} # run only if this is a push - tag push will only succeed in upstream
- if: ${{ github.event_name != 'pull_request' }} # run only if this is not a pull request - tag push will only succeed in upstream
name: Deploy multi-arch base container image to Docker Hub
run: mvn -f modules/container-base -Pct deploy -Dbase.image.tag=${{ env.IMAGE_TAG }} -Ddocker.registry=${{ env.REGISTRY }}

0 comments on commit 5d77ab9

Please sign in to comment.