diff --git a/.github/workflows/retarget.yml b/.github/workflows/retarget.yml new file mode 100644 index 0000000..6bb9418 --- /dev/null +++ b/.github/workflows/retarget.yml @@ -0,0 +1,16 @@ +name: Retest base branch change + +on: + pull_request: + # Keep the same skipped check on a normal code update and a text edit. + types: [opened, reopened, synchronize, edited] + +jobs: + retest: + if: github.event.changes.base.ref.from + permissions: + contents: read + statuses: write + uses: ./.github/workflows/test.yml + secrets: + GDRIVE_USER_CREDENTIALS_DATA: ${{ secrets.GDRIVE_USER_CREDENTIALS_DATA }} diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 0a15012..db99600 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -3,8 +3,11 @@ on: branches: - main pull_request: - types: [opened, reopened, synchronize, edited] workflow_dispatch: + workflow_call: + secrets: + GDRIVE_USER_CREDENTIALS_DATA: + required: false name: Tests @@ -15,7 +18,6 @@ jobs: pending: if: >- github.event_name == 'pull_request' && github.base_ref == 'main' && - (github.event.action != 'edited' || github.event.changes.base.ref.from) && github.event.pull_request.head.repo.full_name == github.repository && github.event.pull_request.user.login != 'dependabot[bot]' && github.actor != 'dependabot[bot]' && !startsWith(github.head_ref, 'dependabot/') @@ -30,7 +32,6 @@ jobs: test: name: test (${{ matrix.os }}, ${{ matrix.pyv }}) runs-on: ${{ matrix.os }} - if: github.event.action != 'edited' || github.event.changes.base.ref.from outputs: live: ${{ steps.live.outcome }}