actions-test/.gitea/workflows/build.yml

47 lines
1.3 KiB
YAML

name: Build Docker images
on:
push:
tags:
- '*'
branches:
- main
jobs:
push-nightly-image:
runs-on: ubuntu-latest
steps:
- name: Set up QEMU
uses: docker/setup-qemu-action@v2
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Login to Docker Hub
uses: docker/login-action@v2
with:
registry: git.min.rip
username: ${{ gitea.repository_owner }}
password: ${{ secrets.REGISTRY_TOKEN }}
- name: Build and push
uses: docker/build-push-action@v4
with:
push: true
tags: git.min.rip/${{ gitea.repository }}:latest
push-release-image:
if: gitea.ref_type == 'tag'
runs-on: ubuntu-latest
steps:
- name: Set up QEMU
uses: docker/setup-qemu-action@v2
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Login to Docker Hub
uses: docker/login-action@v2
with:
registry: git.min.rip
username: ${{ gitea.repository_owner }}
password: ${{ secrets.REGISTRY_TOKEN }}
- name: Build and push
uses: docker/build-push-action@v4
with:
push: true
tags: git.min.rip/${{ gitea.repository }}:${{ gitea.ref_name }}