OF-DL/.gitea/workflows/publish-docker.yml
sim0n00ps 0eb2a6dbeb
All checks were successful
Publish release zip / build (push) Successful in 56s
Publish Docker image / Build and push Docker image to Gitea Registry (push) Successful in 3m23s
Change publish-docker again
2025-05-05 00:33:56 +01:00

48 lines
1.3 KiB
YAML

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 name and version
id: version
run: |
FULL_REF="${{ gitea.ref }}"
TAG="${FULL_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 }}