Tag uncached builds with the date
The weekly rebuild overwrites latest/main/<sha> with a fresh image of the same commit; a YYYYMMDD tag keeps each week's image to roll back to. Keyed on no-cache, since a called workflow never sees the schedule event. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
0e1e97534f
commit
ae3636baab
2 files changed
+7
-1
No files matched your search
@@ -68,6 +68,11 @@ jobs:
|
||||
username: ${{ gitea.actor }}
|
||||
password: ${{ secrets.REGISTRY_TOKEN }}
|
||||
|
||||
# Uncached builds (the callers' weekly rebuild) also get a YYYYMMDD tag:
|
||||
# they overwrite latest/main/<sha> with an image of the same commit, so
|
||||
# the date tag is what's left to roll back to. Keyed on no-cache rather
|
||||
# than type=schedule, because a called workflow only ever sees the
|
||||
# event workflow_call.
|
||||
- name: Extract metadata
|
||||
id: meta
|
||||
uses: docker/metadata-action@v6
|
||||
@@ -78,6 +83,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 }}
|
||||
|
||||
# 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,
|
||||
|
||||
@@ -46,7 +46,7 @@ For x64 and arm64 (Raspberry Pi), add:
|
||||
| `context` | `.` | Docker build context. |
|
||||
| `file` | `<context>/Dockerfile` | Path to the Dockerfile. |
|
||||
| `build-args` | | Extra build args, one `NAME=value` per line, e.g. `APP_VERSION=${{ gitea.sha }}`. Used for both the scanned and the pushed build. |
|
||||
| `no-cache` | `false` | Build without cache. Use `${{ gitea.event_name == 'schedule' }}` so weekly rebuilds pick up new packages. |
|
||||
| `no-cache` | `false` | Build without cache. Use `${{ gitea.event_name == 'schedule' }}` so weekly rebuilds pick up new packages. Uncached builds are also tagged `YYYYMMDD` (UTC), which keeps each week's image as a rollback point. |
|
||||
| `severity` | `CRITICAL,HIGH` | Severities that fail the build. Vulnerabilities without a fixed version never fail it. |
|
||||
| `runs-on` | `linux-amd64` | Runner label. |
|
||||
|
||||
|
||||
Reference in new issue
Block a user