Skip to content

Commit

Permalink
Cleanup changes override vars
Browse files Browse the repository at this point in the history
  • Loading branch information
aborgna-q committed Oct 21, 2024
1 parent 3e7a539 commit 638f3a5
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions .github/workflows/ci-rs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,15 +40,17 @@ jobs:
- name: Override label
id: override
run: |
echo "Labels: ${{ github.event.pull_request.labels.*.name }}"
echo "Label contains run-ci-checks: ${{ contains( github.event.pull_request.labels.*.name, 'run-ci-checks') }}"
if [ "${{ github.event_name == 'pull_request' && contains( github.event.pull_request.labels.*.name, 'run-ci-checks') }}" == "true" ]; then
echo "Label contains run-ci-checks: $OVERRIDE_LABEL"
if [ "$OVERRIDE_LABEL" == "true" ]; then
echo "Overriding due to label 'run-ci-checks'"
echo "out=true" >> $GITHUB_OUTPUT
elif [ "${{ github.ref_name == github.event.repository.default_branch }}" == "true" ]; then
elif [ "$DEFAULT_BRANCH" == "true" ]; then
echo "Overriding due to running on the default branch"
echo "out=true" >> $GITHUB_OUTPUT
fi
env:
OVERRIDE_LABEL: ${{ github.event_name == 'pull_request' && contains( github.event.pull_request.labels.*.name, 'run-ci-checks') }}
DEFAULT_BRANCH: ${{ github.ref_name == github.event.repository.default_branch }}
- uses: dorny/paths-filter@v3
id: filter
with:
Expand Down

0 comments on commit 638f3a5

Please sign in to comment.