From 05f8e18f1f32ebc1cb36a65ea4ed0ebb22f86fdf Mon Sep 17 00:00:00 2001 From: Thomas Gloor Date: Fri, 13 Nov 2026 21:19:16 +0100 Subject: [PATCH] Read no-cache from the event payload as well The runner evaluates a caller's with: expression again inside the called workflow, where the event is workflow_call, so no-cache: gitea.event_name == 'schedule' was always false: weekly rebuilds reused the cached upgrade layers and never got their YYYYMMDD tag. The payload carries the value Gitea computed for the caller. Co-Authored-By: Claude Opus 5.5 --- .gitea/workflows/docker-build.yml | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/.gitea/workflows/docker-build.yml b/.gitea/workflows/docker-build.yml index f48015a..ac34d17 100644 --- a/.gitea/workflows/docker-build.yml +++ b/.gitea/workflows/docker-build.yml @@ -42,6 +42,12 @@ env: jobs: build: runs-on: ${{ inputs.runs-on }} + env: + # The runner evaluates a caller's `with:` expression again in here, where + # the event is workflow_call, so the callers' `gitea.event_name == + # 'schedule'` always came out false and weekly rebuilds stayed cached. + # The event payload carries the value Gitea computed for the caller. + NO_CACHE: ${{ (inputs.no-cache || github.event.inputs['no-cache']) == true }} steps: - name: Checkout uses: actions/checkout@v7 @@ -83,7 +89,7 @@ jobs: type=semver,pattern={{version}} type=sha,prefix=,format=short type=raw,value=latest,enable={{is_default_branch}} - type=raw,value={{date 'YYYYMMDD'}},enable=${{ inputs.no-cache }} + type=raw,value={{date 'YYYYMMDD'}},enable=${{ env.NO_CACHE }} # Each platform is built into the local Docker daemon on its own (a # multi-platform image can't be loaded), scanned against the Trivy server, @@ -100,7 +106,6 @@ jobs: SEVERITY: ${{ inputs.severity }} VERSION: ${{ steps.meta.outputs.version }} BUILD_ARGS: ${{ inputs.build-args }} - NO_CACHE: ${{ inputs.no-cache }} TRIVY_SERVER: ${{ vars.TRIVY_SERVER || 'http://localhost:4954' }} TRIVY_TOKEN: ${{ secrets.TRIVY_TOKEN }} run: |