From bdaed1799de6e2d9885a70d69029e8cdc9a4de50 Mon Sep 17 00:00:00 2001 From: Ivan Ogasawara Date: Thu, 21 Dec 2023 21:57:07 -0400 Subject: [PATCH] fix some issues on ci --- .github/workflows/main.yaml | 29 ++++++++++++++++++++++++++++- 1 file changed, 28 insertions(+), 1 deletion(-) diff --git a/.github/workflows/main.yaml b/.github/workflows/main.yaml index fab8a56..12f3cb4 100644 --- a/.github/workflows/main.yaml +++ b/.github/workflows/main.yaml @@ -1,9 +1,35 @@ name: main -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/gh-check-pr-is-updated@1.0.0 + with: + remote_branch: origin/main + pr_sha: ${{ github.event.pull_request.head.sha }} + tests: + needs: check-branch runs-on: ubuntu-latest timeout-minutes: 10 @@ -55,6 +81,7 @@ jobs: run: makim tests.smoke --verbose linter: + needs: check-branch runs-on: ubuntu-latest timeout-minutes: 10