diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 58b5f65b0..4fbe91db2 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -22,6 +22,7 @@ permissions: jobs: lint_test_build: uses: ./.github/workflows/lint_test_build.yml + if: ${{ github.ref != 'refs/heads/main' || github.event_name == 'workflow_dispatch' }} permissions: contents: read with: diff --git a/.github/workflows/lint_test_build.yml b/.github/workflows/lint_test_build.yml index 66b21aacc..0e7567d51 100644 --- a/.github/workflows/lint_test_build.yml +++ b/.github/workflows/lint_test_build.yml @@ -24,6 +24,7 @@ jobs: fetch-depth: 0 filter: tree:0 - name: Fetch main branch + if: ${{ github.ref != 'refs/heads/main' }} run: git fetch origin main:main - name: Set up Go uses: actions/setup-go@v5