ci: update Gitea Actions workflow with docker/build-push-action

This commit is contained in:
Tracewebstudio Dev 2026-04-19 00:05:05 +02:00
parent aed8cf6802
commit bd9bfcfbb7

View file

@ -10,6 +10,7 @@ jobs:
build:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
service:
- gateway
@ -39,20 +40,24 @@ jobs:
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Login to Registry
uses: docker/login-action@v3
with:
registry: ${{ secrets.REGISTRY_HOSTPORT }}
username: ${{ secrets.REGISTRY_USERNAME }}
password: ${{ secrets.REGISTRY_PASSWORD }}
- name: Build and push
uses: docker/build-push-action@v5
with:
context: .
push: true
tags: |
${{ secrets.REGISTRY_HOSTPORT }}/nxtgauge-rust-${{ matrix.service }}:${{ github.sha }}
${{ secrets.REGISTRY_HOSTPORT }}/nxtgauge-rust-${{ matrix.service }}:${{ github.ref_name }}-latest
${{ secrets.REGISTRY_HOSTPORT }}/nxtgauge-rust-${{ matrix.service }}:${{ gitea.sha }}
${{ secrets.REGISTRY_HOSTPORT }}/nxtgauge-rust-${{ matrix.service }}:${{ gitea.ref }}-latest
file: Dockerfile.simple
build-args: |
SERVICE_NAME=${{ matrix.service }}
cache-from: type=gha
cache-to: type=gha,mode=max
insecure: true
migrate:
runs-on: ubuntu-latest
@ -63,13 +68,19 @@ jobs:
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Login to Registry
uses: docker/login-action@v3
with:
registry: ${{ secrets.REGISTRY_HOSTPORT }}
username: ${{ secrets.REGISTRY_USERNAME }}
password: ${{ secrets.REGISTRY_PASSWORD }}
- name: Build and push migrate
uses: docker/build-push-action@v5
with:
context: .
push: true
tags: |
${{ secrets.REGISTRY_HOSTPORT }}/nxtgauge-db-migrate:${{ github.sha }}
${{ secrets.REGISTRY_HOSTPORT }}/nxtgauge-db-migrate:${{ github.ref_name }}-latest
${{ secrets.REGISTRY_HOSTPORT }}/nxtgauge-db-migrate:${{ gitea.sha }}
${{ secrets.REGISTRY_HOSTPORT }}/nxtgauge-db-migrate:${{ gitea.ref }}-latest
file: Dockerfile.migrate
insecure: true