Skip to content

several fixes

several fixes #8

name: Build and Push to GHCR
on:
push:
branches:
- main
paths-ignore:
- 'README.md'
- 'LICENSE'
- 'third_party/**'
- 'assets/**'
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Log in to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Generate CalVer tag
id: calver
run: echo "tag=$(date +'%Y.%m.%d')" >> "$GITHUB_OUTPUT"
- name: Build and push Docker image
uses: docker/build-push-action@v5
with:
context: .
push: true
tags: |
ghcr.io/${{ github.repository }}:latest
ghcr.io/${{ github.repository }}:${{ steps.calver.outputs.tag }}