Skip to content

Commit

Permalink
Add extra fake job
Browse files Browse the repository at this point in the history
This allows us to set a required job
on the building of Docker Images
to merge without it affecting other
unrelated PRs.
  • Loading branch information
jonathanrainer committed Aug 21, 2024
1 parent 643a2da commit 7e62789
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 2 deletions.
12 changes: 10 additions & 2 deletions .github/workflows/docker_publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ jobs:
run: |
CHANGED_DIRS=$(echo "${{ steps.calculate_changed_files.outputs.all_changed_files }}" | jq -c '[.[] | select(. | contains(".") | not)'])
echo "changed_dirs=$CHANGED_DIRS" >> "$GITHUB_OUTPUT"
build-and-push-image:
build-and-push-images:
runs-on: ubuntu-latest
permissions:
contents: read
Expand Down Expand Up @@ -107,6 +107,14 @@ jobs:
with:
tag_name: ${{ matrix.changed_dir }}/v${{ steps.calculate_version.outputs.version }}
release_name: ${{ matrix.changed_dir }} - v${{ steps.calculate_version.outputs.version }}

check-builds-all-completes:
name: Docker Images Built & Pushed
if: ${{ always() }}
runs-on: ubuntu-latest
needs:
- build-and-push-images
steps:
- run: |
exit ${{ (contains(needs.*.result, 'failure') || contains(needs.*.result, 'cancelled') || contains(needs.*.result, 'skipped')) && 1 || 0 }}
14 changes: 14 additions & 0 deletions .github/workflows/docker_publish_fake.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
name: Build & Publish Docker Images

on:
pull_request:

jobs:
check-builds-all-completes:
name: Docker Images Built & Pushed
if: ${{ always() }}
runs-on: ubuntu-latest
needs:
- build-and-push-images
steps:
- run: 'echo "No builds required"'

0 comments on commit 7e62789

Please sign in to comment.