Skip to content

Commit

Permalink
ci: Fix ON attribute in CI workflow main.yaml (osl-incubator#73)
Browse files Browse the repository at this point in the history
  • Loading branch information
xmnlab authored Dec 22, 2023
1 parent f7a9fb7 commit 92eed5d
Showing 1 changed file with 28 additions and 1 deletion.
29 changes: 28 additions & 1 deletion .github/workflows/main.yaml
Original file line number Diff line number Diff line change
@@ -1,9 +1,35 @@
name: build

on: [push, pull_request]
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]

jobs:
check-branch:
runs-on: ubuntu-latest

timeout-minutes: 2
concurrency:
group: ci-check-branch-${{ github.ref }}
cancel-in-progress: true

steps:
- uses: actions/checkout@v3
if: ${{ github.event_name == 'pull_request' }}
with:
fetch-depth: 0

- name: Check if the PR's branch is updated
if: ${{ github.event_name == 'pull_request' }}
uses: osl-incubator/[email protected]
with:
remote_branch: origin/main
pr_sha: ${{ github.event.pull_request.head.sha }}

tests:
needs: check-branch
strategy:
matrix:
python_version:
Expand Down Expand Up @@ -114,6 +140,7 @@ jobs:
uses: mxschmitt/action-tmate@v3

linter-and-docs:
needs: check-branch
runs-on: ubuntu-latest
timeout-minutes: 10

Expand Down

0 comments on commit 92eed5d

Please sign in to comment.