Skip to content

Commit

Permalink
* Set force_rebuild if workflow is triggered by newly created tag
Browse files Browse the repository at this point in the history
* Use github context to allow workflow testing on forks

Signed-off-by: Andreas Heinrich <[email protected]>
  • Loading branch information
andistorm committed Mar 18, 2024
1 parent 03b3d35 commit 4046607
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/deploy-all-docker-images.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ jobs:
image_name: [everest-ci-env, everest-clang-format]
uses: ./.github/workflows/deploy-single-docker-image.yml
with:
force_rebuild: ${{ inputs.force_rebuild || false }}
force_rebuild: ${{ inputs.force_rebuild || (github.event_name == 'push' && startsWith(github.event.ref, 'refs/tags/' )) || false }}
image_name: ${{ matrix.image_name }}
docker_registry: ghcr.io
github_ref_before: ${{ github.event.before }}
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/deploy-single-docker-image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ jobs:
- name: Checkout Dockerfile
uses: actions/checkout@v3
with:
repository: everest/everest-utils
repository: ${{ github.repository }}
path: everest-utils
ref: ${{ inputs.github_ref_after }}
token: ${{secrets.SA_GITHUB_PAT}}
Expand All @@ -62,7 +62,7 @@ jobs:
- name: Checkout Dockerfile
uses: actions/checkout@v3
with:
repository: everest/everest-utils
repository: ${{ github.repository }}
path: everest-utils
ref: ${{github.ref}}
token: ${{secrets.SA_GITHUB_PAT}}
Expand All @@ -82,7 +82,7 @@ jobs:
id: meta
uses: docker/metadata-action@v3
with:
images: ${{ inputs.docker_registry }}/everest/${{ inputs.image_name }}
images: ${{ inputs.docker_registry }}/${{ github.repository_owner }}/${{ inputs.image_name }}
- name: Set up QEMU
uses: docker/setup-qemu-action@v1
with:
Expand Down

0 comments on commit 4046607

Please sign in to comment.