Skip to content

Commit

Permalink
Add additional status that we can use for branch protection
Browse files Browse the repository at this point in the history
  • Loading branch information
mvdbeek committed Nov 20, 2024
1 parent eb46ef9 commit c73bf12
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 0 deletions.
18 changes: 18 additions & 0 deletions .github/workflows/pr_without_change.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
name: Fallback
# Fallback workflow that provides a succeeding "Check workflow success" job
# as this is a requirement for being able to merge a PR
# see https://docs.github.com/en/repositories/configuring-branches-and-merges-in-your-repository/defining-the-mergeability-of-pull-requests/troubleshooting-required-status-checks#handling-skipped-but-required-checks
on:
pull_request:
paths:
- 'scripts/**'
- 'website/**'
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
determine-success:
name: Check workflow success
runs-on: ubuntu-latest
steps:
- run: 'echo "No workflow tests required for this PR"'
11 changes: 11 additions & 0 deletions .github/workflows/workflow_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ jobs:
run: pip install wheel
- name: Planemo lint workflows
uses: galaxyproject/planemo-ci-action@v1
id: lint
with:
mode: lint
workflows: true
Expand Down Expand Up @@ -169,3 +170,13 @@ jobs:
Attention: deployment ${{ needs.deploy.result }}!
https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}
determine-success:
name: Check workflow success
needs: [setup, lint, combine_outputs]
if: ${{ always() && github.ref != 'refs/heads/main' }}
runs-on: ubuntu-latest
steps:
- name: Check status
if: ${{ needs.combine_outputs.result != 'skipped' && (needs.lint.result != 'success' || needs.combine_outputs.result != 'success') }}
run: exit 1

0 comments on commit c73bf12

Please sign in to comment.