Added gitea workflow
All checks were successful
Build and Push / build_and_push (push) Successful in 2m31s

This commit is contained in:
2024-11-09 23:16:52 +01:00
parent 533bf9914b
commit 41212c5a1c
2 changed files with 38 additions and 1 deletions

View File

@@ -0,0 +1,37 @@
name: Build and Push
on: [push]
jobs:
build_and_push:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set Variables
run: |
echo "REGISTRY_ADDRESS=$(echo ${{ github.SERVER_URL }} | sed 's/^https\?:\/\///')" >> $GITHUB_ENV
echo "REPOSITORY_ADDRESS=$(echo ${{ github.repository }} | tr '[:upper:]' '[:lower:]')" >> $GITHUB_ENV
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Login to Gitea Registry
uses: docker/login-action@v3
with:
registry: ${{ env.REGISTRY_ADDRESS }}
username: ${{ github.REPOSITORY_OWNER }}
password: ${{ secrets.PACKAGE_TOKEN }}
- name: Build and push Image
uses: docker/build-push-action@v6
with:
context: .
push: true
tags: |
${{ env.REGISTRY_ADDRESS }}/${{ env.REPOSITORY_ADDRESS }}:${{ github.sha }}
${{ env.REGISTRY_ADDRESS }}/${{ env.REPOSITORY_ADDRESS }}:latest

View File

@@ -11,7 +11,7 @@
version: '3.7'
services:
berichtexporter:
image: registry.gitlab.lino3d.de:443/lino/berichtexporter/main:latest
image: docker pull gitea.lino3d.de/lino/berichtexporter:latest
restart: unless-stopped
ports:
- 3000:3000