runner-ubuntu-custom/.gitea/workflows/release.yml

38 lines
871 B
YAML
Raw Normal View History

2025-01-02 16:17:00 +01:00
name: Publish Docker Image
on:
push:
branches:
- main
env:
REGISTRY_URL: git.tainton.uk
jobs:
publish:
runs-on: ubuntu-latest
2025-01-02 16:24:02 +01:00
permissions:
packages: write
contents: read
2025-01-02 16:17:00 +01:00
steps:
- name: Check out repository code
2025-01-02 16:29:22 +01:00
uses: actions/checkout@v4.2.2
2025-01-02 16:17:00 +01:00
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Log in to Gitea Package Registry
uses: docker/login-action@v3
with:
registry: ${{ env.REGISTRY_URL }}
2025-01-02 16:29:22 +01:00
username: ${{ vars.PACKAGES_REGISTRY_USERNAME }}
password: ${{ secrets.PACKAGES_REGISTRY_PASSWORD }}
2025-01-02 16:17:00 +01:00
- name: Build and push Docker image
id: push
uses: docker/build-push-action@v6
with:
context: .
push: true
2025-01-02 16:29:22 +01:00
tags: ${{ env.REGISTRY_URL }}/${{ gitea.repository }}:latest