mirror of
https://github.com/eclipse-sailing-analytics/sailing-analytics.git
synced 2026-11-03 09:39:38 +00:00
use a build-gate job in release.yml so we don't need a dummy workflow
This commit is contained in:
1 parent
676ea6212c
commit
b80904f8fd
2 files changed
+36
-16
No files matched your search
@@ -23,7 +23,27 @@ on:
|
||||
default: '140.0'
|
||||
|
||||
jobs:
|
||||
# The "changes" job will cause the "build" job to get skipped for trivial changes
|
||||
changes:
|
||||
runs-on: ubuntu-latest
|
||||
outputs:
|
||||
should_run: ${{ steps.filter.outputs.code }}
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- id: filter
|
||||
uses: dorny/paths-filter@d1c1ffe0248fe513906c8e24db8ea791d46f8590 # v3.0.3
|
||||
with:
|
||||
filters: |
|
||||
code:
|
||||
- '!wiki/**'
|
||||
- '!.github/workflows/*'
|
||||
- '!**/*.md'
|
||||
- '!README.md'
|
||||
- '!docs/**'
|
||||
|
||||
build:
|
||||
needs: changes
|
||||
if: ${{ needs.changes.outputs.should_run == 'true' || github.event_name == 'workflow_dispatch' }}
|
||||
permissions:
|
||||
contents: write
|
||||
checks: write
|
||||
@@ -216,3 +236,19 @@ jobs:
|
||||
fi
|
||||
echo "Identified Hudson job: ${JOB}"
|
||||
curl -u "${{ vars.HUDSON_JOB_USERNAME }}:${{ secrets.HUDSON_JOB_PASSWORD}}" https://hudson.sapsailing.com/job/${JOB}/build?token=${{ secrets.HUDSON_JOB_TOKEN }}
|
||||
|
||||
build-gate:
|
||||
needs: [changes, build]
|
||||
if: always()
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- run: |
|
||||
if [[ "${{ needs.build.result }}" == "success" ]]; then
|
||||
echo "Build passed."
|
||||
elif [[ "${{ needs.build.result }}" == "skipped" && "${{ needs.changes.outputs.should_run }}" == "false" ]]; then
|
||||
echo "No relevant changes — skipping is OK."
|
||||
else
|
||||
echo "Build failed or was cancelled."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
Reference in new issue
Block a user