diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index e299c734..a06f052f 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -4,11 +4,21 @@ permissions: contents: read id-token: write -on: [pull_request, workflow_call] +on: + pull_request: + workflow_call: + inputs: + branch: + description: "Branch to checkout" + required: false + default: master + type: string jobs: shared-ci: uses: ./.github/workflows/shared-ci.yml + with: + branch: ${{ inputs.branch || 'master' }} pr-ci-all-required: if: always() needs: diff --git a/.github/workflows/daily_ci.yml b/.github/workflows/daily_ci.yml index f0f56257..9eb7d08f 100644 --- a/.github/workflows/daily_ci.yml +++ b/.github/workflows/daily_ci.yml @@ -15,7 +15,12 @@ jobs: DAILY_CI: # Don't run the cron builds on forks if: github.event_name != 'schedule' || github.repository_owner == 'aws' + strategy: + matrix: + branch: [master, v4.x] uses: ./.github/workflows/ci.yml + with: + branch: ${{ matrix.branch }} notify: needs: [ diff --git a/.github/workflows/shared-ci.yml b/.github/workflows/shared-ci.yml index 88233a59..045c5e55 100644 --- a/.github/workflows/shared-ci.yml +++ b/.github/workflows/shared-ci.yml @@ -3,6 +3,11 @@ name: Shared CI Tests on: workflow_call: inputs: + branch: + description: "Branch to checkout" + required: false + default: master + type: string test-published-packages: description: 'Test against published packages instead of checked out code' required: false @@ -34,6 +39,7 @@ jobs: # Always need repo for test scripts and configuration, even when testing published packages uses: actions/checkout@v4 with: + ref: ${{ inputs.branch }} fetch-depth: 0 submodules: true