Skip to content

Added Dockerfile and release workflow #1

Added Dockerfile and release workflow

Added Dockerfile and release workflow #1

Workflow file for this run

name: Release
on:
push:
tags:
- "v[0-9]+.[0-9]+.[0-9]+"
jobs:
release:
name: Release
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Setup QEMU
uses: docker/setup-qemu-action@v3
- name: Setup Docker Buildx
uses: docker/setup-buildx-action@v3
id: buildx
- name: Login GHCR
uses: docker/login-action@v3
with:
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
registry: ghcr.io
- name: Args
id: args
run: |
VERSION=${GITHUB_REF/refs\/tags\//}
echo "VERSION=${VERSION}" >> $GITHUB_OUTPUT
- name: Publish multi-arch Docker image
uses: docker/build-push-action@v6
with:
push: true
builder: ${{ steps.buildx.outputs.name }}
context: .
file: ./Dockerfile
platforms: linux/arm64,linux/amd64
build-args: |
VERSION=${{ steps.args.outputs.VERSION }}
tags: |
ghcr.io/${{ github.repository_owner }}/snapscheduler:${{ steps.args.outputs.VERSION }}
ghcr.io/${{ github.repository_owner }}/snapscheduler:latest
labels: |
org.opencontainers.image.title=${{ github.event.repository.name }}
org.opencontainers.image.description=${{ github.event.repository.description }}
org.opencontainers.image.source=${{ github.event.repository.html_url }}
org.opencontainers.image.url=${{ github.event.repository.html_url }}
org.opencontainers.image.revision=${{ github.sha }}