diff --git a/.github/workflows/generate-test-seed.yml b/.github/workflows/generate-test-seed.yml index 3afacec5..7b8b05b7 100644 --- a/.github/workflows/generate-test-seed.yml +++ b/.github/workflows/generate-test-seed.yml @@ -11,13 +11,16 @@ jobs: runs-on: ubuntu-latest env: ACTION_RUN_URL: '${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}' + BASE_SHA: '${{ github.event.pull_request.base.sha }}' REMOTE_SEED_PATH: 'pull/${{ github.event.pull_request.number }}/seed' SEED_VERSION: 'pull/${{ github.event.pull_request.number }}@${{ github.event.pull_request.head.sha }}' steps: + - name: checkout - uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4 - with: - fetch-depth: 0 + + - name: fetch base commit + run: git fetch --depth=1 origin ${BASE_SHA} - name: Setup Python uses: actions/setup-python@39cd14951b08e74b54015e9e001cdefcf80e669f # v5 @@ -59,7 +62,7 @@ jobs: - name: Lint run: | - npm run lint -- --base origin/${{ github.event.pull_request.base.ref }} + npm run lint -- --base ${BASE_SHA} - name: Generate seed run: | diff --git a/.github/workflows/test-src.yml b/.github/workflows/test-src.yml index 0d296512..1319015e 100644 --- a/.github/workflows/test-src.yml +++ b/.github/workflows/test-src.yml @@ -7,10 +7,15 @@ on: jobs: build: runs-on: ubuntu-latest + env: + BASE_SHA: '${{ github.event.pull_request.base.sha || github.event.merge_group.base_sha }}' + steps: + - name: checkout - uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4 - with: - fetch-depth: 0 + + - name: fetch base commit + run: git fetch --depth=1 origin ${BASE_SHA} - name: npm install run: npm install @@ -25,4 +30,4 @@ jobs: run: npm run test - name: lint - run: npm run lint -- --base ${{ github.event.pull_request.base.sha || github.event.merge_group.base_sha }} + run: npm run lint -- --base ${BASE_SHA}