diff --git a/.github/workflows/shared.yml b/.github/workflows/shared.yml index 108e6c667..254270531 100644 --- a/.github/workflows/shared.yml +++ b/.github/workflows/shared.yml @@ -2,6 +2,12 @@ name: Shared Checks on: workflow_call: + inputs: + ref: + description: "Git ref to checkout (defaults to the triggering event ref)" + required: false + type: string + default: "" permissions: contents: read @@ -14,6 +20,8 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1 + with: + ref: ${{ inputs.ref || github.sha }} - uses: astral-sh/setup-uv@61cb8a9741eeb8a550a1b8544337180c0fc8476b # v7.2.0 with: @@ -45,6 +53,8 @@ jobs: steps: - uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1 + with: + ref: ${{ inputs.ref || github.sha }} - name: Install uv uses: astral-sh/setup-uv@61cb8a9741eeb8a550a1b8544337180c0fc8476b # v7.2.0 @@ -66,6 +76,8 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1 + with: + ref: ${{ inputs.ref || github.sha }} - uses: astral-sh/setup-uv@61cb8a9741eeb8a550a1b8544337180c0fc8476b # v7.2.0 with: diff --git a/.github/workflows/weekly-lockfile-update.yml b/.github/workflows/weekly-lockfile-update.yml index 09e1efe51..bfa8be2b2 100644 --- a/.github/workflows/weekly-lockfile-update.yml +++ b/.github/workflows/weekly-lockfile-update.yml @@ -13,6 +13,8 @@ permissions: jobs: update-lockfile: runs-on: ubuntu-latest + outputs: + pull-request-number: ${{ steps.create-pr.outputs.pull-request-number }} steps: - uses: actions/checkout@v6.0.1 @@ -29,6 +31,7 @@ jobs: echo '```' >> pr_body.md - name: Create pull request + id: create-pr uses: peter-evans/create-pull-request@98357b18bf14b5342f975ff684046ec3b2a07725 # v7 with: commit-message: "chore: update uv.lock with latest dependencies" @@ -38,3 +41,20 @@ jobs: delete-branch: true add-paths: uv.lock labels: dependencies + + checks: + if: needs.update-lockfile.outputs.pull-request-number + needs: [update-lockfile] + uses: ./.github/workflows/shared.yml + with: + ref: weekly-lockfile-update + + all-green: + if: always() + needs: [update-lockfile, checks] + runs-on: ubuntu-latest + steps: + - uses: re-actors/alls-green@05ac9388f0aebcb5727afa17fcccfecd6f8ec5fe # v1.2.2 + with: + jobs: ${{ toJSON(needs) }} + allowed-skips: checks