From 78ff4bb8759eeb655916e29618050fd7b6b90baa Mon Sep 17 00:00:00 2001 From: Brian Choromanski Date: Wed, 18 Mar 2026 18:44:39 -0400 Subject: [PATCH] fix: Updated workflows to checkout on commit of commit-version-bump (#7217) Co-authored-by: Michael Genson <71845777+michael-genson@users.noreply.github.com> --- .github/workflows/build-package.yml | 5 +++++ .github/workflows/publish.yml | 5 +++++ .github/workflows/release.yml | 7 +++++++ .github/workflows/test-backend.yml | 6 ++++++ .github/workflows/test-frontend.yml | 6 ++++++ 5 files changed, 29 insertions(+) diff --git a/.github/workflows/build-package.yml b/.github/workflows/build-package.yml index 99d4f8d6a..8f4be0d1e 100644 --- a/.github/workflows/build-package.yml +++ b/.github/workflows/build-package.yml @@ -6,6 +6,9 @@ on: tag: required: true type: string + ref: + required: false + type: string jobs: build-frontend: @@ -15,6 +18,8 @@ jobs: steps: - name: Checkout 🛎 uses: actions/checkout@v4 + with: + ref: ${{ inputs.ref || github.sha }} - name: Setup node env 🏗 uses: actions/setup-node@v4.0.0 diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index a7740e6f9..3203478ea 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -9,6 +9,9 @@ on: tags: required: false type: string + ref: + required: false + type: string secrets: DOCKERHUB_USERNAME: required: true @@ -21,6 +24,8 @@ jobs: steps: - name: Checkout repository uses: actions/checkout@v4 + with: + ref: ${{ inputs.ref || github.sha }} - name: Log in to the Container registry (ghcr.io) uses: docker/login-action@v3 diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index d9613cdb2..0363166ab 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -60,12 +60,16 @@ jobs: uses: ./.github/workflows/test-backend.yml needs: - commit-version-bump + with: + ref: ${{ needs.commit-version-bump.outputs.commit-sha }} frontend-tests: name: "Frontend Tests" uses: ./.github/workflows/test-frontend.yml needs: - commit-version-bump + with: + ref: ${{ needs.commit-version-bump.outputs.commit-sha }} build-package: name: Build Package @@ -74,6 +78,7 @@ jobs: - commit-version-bump with: tag: ${{ github.event.release.tag_name }} + ref: ${{ needs.commit-version-bump.outputs.commit-sha }} publish: permissions: @@ -90,7 +95,9 @@ jobs: - backend-tests - frontend-tests - build-package + - commit-version-bump with: + ref: ${{ needs.commit-version-bump.outputs.commit-sha }} tag: ${{ github.event.release.tag_name }} tags: | hkotel/mealie:latest diff --git a/.github/workflows/test-backend.yml b/.github/workflows/test-backend.yml index bc21771fb..5856dbfdd 100644 --- a/.github/workflows/test-backend.yml +++ b/.github/workflows/test-backend.yml @@ -2,6 +2,10 @@ name: Backend Lint and Test on: workflow_call: + inputs: + ref: + required: false + type: string jobs: tests: @@ -43,6 +47,8 @@ jobs: - name: Check out repository uses: actions/checkout@v4 + with: + ref: ${{ inputs.ref || github.sha }} - name: Set up python uses: actions/setup-python@v5 diff --git a/.github/workflows/test-frontend.yml b/.github/workflows/test-frontend.yml index e6de89f7d..17dbde449 100644 --- a/.github/workflows/test-frontend.yml +++ b/.github/workflows/test-frontend.yml @@ -2,6 +2,10 @@ name: Frontend Lint and Test on: workflow_call: + inputs: + ref: + required: false + type: string jobs: lint: @@ -10,6 +14,8 @@ jobs: steps: - name: Checkout 🛎 uses: actions/checkout@v4 + with: + ref: ${{ inputs.ref || github.sha }} - name: Setup node env 🏗 uses: actions/setup-node@v4.0.0