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

47 lines
1.3 KiB
YAML
Raw Normal View History

2023-08-30 23:23:45 -05:00
name: Build Docker images
2023-08-03 16:57:16 -05:00
on:
push:
2023-08-30 23:23:45 -05:00
tags:
- '*'
2023-08-03 16:57:16 -05:00
branches:
- main
jobs:
2023-08-30 23:23:45 -05:00
push-nightly-image:
2023-08-03 16:57:16 -05:00
runs-on: ubuntu-latest
steps:
2023-08-03 20:24:22 -05:00
- name: Set up QEMU
uses: docker/setup-qemu-action@v2
2023-08-03 16:57:16 -05:00
- 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
2023-08-03 19:51:21 -05:00
username: ${{ gitea.repository_owner }}
2023-08-30 22:28:31 -05:00
password: ${{ secrets.REGISTRY_TOKEN }}
2023-08-03 16:57:16 -05:00
- name: Build and push
2023-08-30 22:10:20 -05:00
uses: docker/build-push-action@v4
2023-08-03 16:57:16 -05:00
with:
push: true
2023-08-30 21:53:01 -05:00
tags: git.min.rip/${{ gitea.repository }}:latest
2023-08-30 23:23:45 -05:00
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 }}