Add publish-docker.yml
Some checks failed
Publish release zip / build (push) Successful in 57s
Publish Docker image / Build and push Docker image to Gitea Registry (push) Failing after 11s

This commit is contained in:
sim0n00ps 2025-05-05 00:21:12 +01:00
parent 3b1138d44c
commit f452fee64a

View File

@ -0,0 +1,47 @@
name: Publish Docker image
on:
push:
tags:
- 'OFDLV*'
jobs:
docker:
name: Build and push Docker image to Gitea Registry
runs-on: ubuntu-latest
steps:
- name: Extract tag and version
id: version
run: |
TAG="${{ gitea.ref##refs/tags/ }}"
VERSION="${TAG#OFDLV}"
echo "Tag: $TAG"
echo "Version: $VERSION"
echo "tag=$TAG" >> "$GITEA_OUTPUT"
echo "version=$VERSION" >> "$GITEA_OUTPUT"
- name: Checkout code
uses: actions/checkout@v4
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Log in to Gitea Docker Registry
uses: docker/login-action@v3
with:
registry: git.ofdl.tools
username: ${{ secrets.REGISTRY_USER }}
password: ${{ secrets.REGISTRY_TOKEN }}
- name: Build and push Docker image
uses: docker/build-push-action@v6
with:
context: .
platforms: linux/amd64,linux/arm64
push: true
tags: |
git.ofdl.tools/sim0n00ps/of-dl:latest
git.ofdl.tools/sim0n00ps/of-dl:${{ steps.version.outputs.version }}
build-args: |
VERSION=${{ steps.version.outputs.version }}