Skip to content

Commit

Permalink
🛬 Skip BuildJet runners without commit message
Browse files Browse the repository at this point in the history
  • Loading branch information
agriyakhetarpal committed Apr 23, 2024
1 parent 30a90ea commit cc2c76f
Showing 1 changed file with 17 additions and 1 deletion.
18 changes: 17 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,22 @@ jobs:
- name: Run style checks
run: pipx run nox -s lint

check_commit_message:
name: Check for skips
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@1d96c772d19495a3b5c517cd2bc0cb401ea0529f # v4.1.3

- name: Check commit message
id: check-commit-message
if: contains(github.event.head_commit.message, '[buildjet]')
run: echo "Checking commit message to invoke BuildJet runners"

# now if the previous step runs, then the next steps will run, otherwise it will be skipped
- name: Run BuildJet runners
if: steps.check-commit-message.outcome != 'skipped'
run: echo "Running BuildJet runners"

build_wheels:
needs: [style]
name: ${{ matrix.runs-on }}-python-${{ matrix.python-version }}
Expand Down Expand Up @@ -79,7 +95,7 @@ jobs:
run: nox -s venv

build_wheels_linux_aarch64:
needs: [style]
needs: [check_commit_message]
name: linux-aarch64-buildjet-python-3.12
runs-on: buildjet-2vcpu-ubuntu-2204-arm
steps:
Expand Down

0 comments on commit cc2c76f

Please sign in to comment.