Skip to content

fix: tolerate legacy run history without targets #19

fix: tolerate legacy run history without targets

fix: tolerate legacy run history without targets #19

Workflow file for this run

name: Docker Build and Push
on:
push:
tags:
- "v*"
permissions:
contents: read
packages: write
jobs:
docker:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: docker/setup-qemu-action@v3
- uses: docker/setup-buildx-action@v3
- name: Log in to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Log in to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- uses: docker/metadata-action@v5
id: meta
with:
images: |
czyt/nowledge-mem-snap
ghcr.io/${{ github.repository }}
tags: |
type=ref,event=tag
type=semver,pattern={{version}}
type=semver,pattern={{major}}.{{minor}}
type=sha,prefix=sha-
type=raw,value=latest
- name: Set build time
id: build-time
run: echo "value=$(date -u '+%Y-%m-%d_%H:%M:%S_UTC')" >> "$GITHUB_OUTPUT"
- uses: docker/build-push-action@v6
with:
context: .
platforms: linux/amd64,linux/arm64
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
cache-from: type=gha
cache-to: type=gha,mode=max
build-args: |
VERSION=${{ github.ref_name }}
BUILD_TIME=${{ steps.build-time.outputs.value }}
GIT_COMMIT=${{ github.sha }}