From 0f6ed1595ce14223f41579e5e9b41dd3e52a1782 Mon Sep 17 00:00:00 2001 From: Valentin Brandl Date: Sun, 11 Aug 2024 18:21:25 +0200 Subject: [PATCH] Publish to package registry --- .gitea/workflows/publish.yml | 39 ++++++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 .gitea/workflows/publish.yml diff --git a/.gitea/workflows/publish.yml b/.gitea/workflows/publish.yml new file mode 100644 index 0000000..9bba0fd --- /dev/null +++ b/.gitea/workflows/publish.yml @@ -0,0 +1,39 @@ +name: Publish + +on: + push: + branches: + - master + +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 + + - 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 }}