2024-08-11 18:21:25 +02:00
|
|
|
name: Publish
|
|
|
|
|
|
|
|
on:
|
|
|
|
push:
|
|
|
|
branches:
|
2024-08-11 19:47:58 +02:00
|
|
|
- main
|
2024-08-11 18:21:25 +02:00
|
|
|
|
|
|
|
jobs:
|
|
|
|
publish:
|
|
|
|
name: Publish Docker Image
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
env:
|
|
|
|
DOCKER_ORG: vbrandl
|
|
|
|
DOCKER_LATEST: latest
|
|
|
|
|
|
|
|
steps:
|
|
|
|
- name: Checkout sources
|
|
|
|
uses: actions/checkout@v4
|
2024-08-11 18:39:45 +02:00
|
|
|
with:
|
|
|
|
submodules: true
|
2024-08-11 18:21:25 +02:00
|
|
|
|
|
|
|
- name: Login to Container Registry
|
|
|
|
uses: docker/login-action@v3
|
|
|
|
with:
|
|
|
|
registry: https://git.vbrandl.net
|
|
|
|
username: ${{ secrets.REGISTRY_USER }}
|
|
|
|
password: ${{ secrets.REGISTRY_PASS }}
|
|
|
|
|
|
|
|
- name: Get Meta
|
|
|
|
id: meta
|
|
|
|
run: |
|
|
|
|
echo REPO_NAME=$(echo ${GITHUB_REPOSITORY} | awk -F"/" '{print $2}') >> $GITHUB_OUTPUT
|
|
|
|
|
|
|
|
- name: Build and push
|
|
|
|
uses: docker/build-push-action@v6
|
|
|
|
with:
|
|
|
|
context: .
|
|
|
|
file: ./Dockerfile
|
|
|
|
push: true
|
|
|
|
tags: |
|
|
|
|
git.vbrandl.net/${{ env.DOCKER_ORG }}/${{ steps.meta.outputs.REPO_NAME }}:${{ env.DOCKER_LATEST }}
|