Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 23 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,29 @@ concurrency:
cancel-in-progress: ${{ github.ref_type != 'tag' }}

jobs:
check-skip:
name: Check skip conditions
runs-on: ubuntu-latest
outputs:
skip: ${{ steps.skip-check.outputs.skip }}
steps:
- name: Check skip environment variables
id: skip-check
run: |
if [[ "${{ github.event_name }}" == "push" && "${{ vars.SKIP_ON_PUSH }}" != "" ]]; then
echo "Skipping build on push due to SKIP_ON_PUSH environment variable"
echo "skip=true" >> $GITHUB_OUTPUT
elif [[ "${{ github.event_name }}" == "pull_request_target" && "${{ vars.SKIP_ON_PR }}" != "" ]]; then
echo "Skipping build on pull request due to SKIP_ON_PR environment variable"
echo "skip=true" >> $GITHUB_OUTPUT
else
echo "skip=false" >> $GITHUB_OUTPUT
fi

container:
name: Build container
needs: [check-skip]
if: ${{ needs.check-skip.outputs.skip == 'false' }}
uses: ./.github/workflows/build-container.yml
with:
context: ./contrib/containers/ci
Expand All @@ -28,6 +49,8 @@ jobs:

container-slim:
name: Build slim container
needs: [check-skip]
if: ${{ needs.check-skip.outputs.skip == 'false' }}
uses: ./.github/workflows/build-container.yml
with:
context: ./contrib/containers/ci
Expand Down
Loading