From 25dacab23449355e5748fb327d85aa36dc6aaedf Mon Sep 17 00:00:00 2001 From: Varakh Date: Tue, 19 Nov 2024 12:26:17 +0100 Subject: [PATCH] Publish to Forgejo as well as to DockerHub --- .forgejo/workflows/release.yaml | 23 +++++++++++++++++++---- .forgejo/workflows/release_rebuild.yaml | 19 +++++++++++++++---- 2 files changed, 34 insertions(+), 8 deletions(-) diff --git a/.forgejo/workflows/release.yaml b/.forgejo/workflows/release.yaml index c2c6e3f..8c5adc1 100644 --- a/.forgejo/workflows/release.yaml +++ b/.forgejo/workflows/release.yaml @@ -5,6 +5,10 @@ on: env: REVISION: ${{ github.sha }} IMAGE_TAG: varakh/hetzner-storagebox-exporter + IMAGE_TAG_PRIVATE: git.myservermanager.com/varakh/hetzner-storagebox-exporter + FORGEJO_URL: https://git.myservermanager.com + FORGEJO_FQDN: git.myservermanager.com + FORGEJO_REPO: varakh/hetzner-storagebox-exporter VERSION_MAJOR: 1 VERSION_MINOR: 0 VERSION_PATCH: 0 @@ -25,6 +29,13 @@ jobs: - name: Set up Docker Buildx uses: docker/setup-buildx-action@v2 + - name: Login to Forgejo + uses: docker/login-action@v2 + with: + registry: ${{ env.FORGEJO_FQDN }} + username: ${{ secrets.FORGEJO_USER }} + password: ${{ secrets.FORGEJO_TOKEN }} + - name: Login to Docker Hub uses: docker/login-action@v2 with: @@ -36,7 +47,11 @@ jobs: with: push: true tags: | - ${{ env.IMAGE_TAG }}:${{ env.VERSION_MAJOR }} - ${{ env.IMAGE_TAG }}:${{ env.VERSION_MAJOR }}.${{ env.VERSION_MINOR }} - ${{ env.IMAGE_TAG }}:${{ env.VERSION_MAJOR }}.${{ env.VERSION_MINOR }}.${{ env.VERSION_PATCH }} - ${{ env.IMAGE_TAG }}:latest + ${{ env.IMAGE_TAG_PRIVATE }}:${{ env.VERSION_MAJOR }} + ${{ env.IMAGE_TAG_PRIVATE }}:${{ env.VERSION_MAJOR }}.${{ env.VERSION_MINOR }} + ${{ env.IMAGE_TAG_PRIVATE }}:${{ env.VERSION_MAJOR }}.${{ env.VERSION_MINOR }}.${{ env.VERSION_PATCH }} + ${{ env.IMAGE_TAG_PRIVATE }}:latest + ${{ env.IMAGE_TAG }}:${{ env.VERSION_MAJOR }} + ${{ env.IMAGE_TAG }}:${{ env.VERSION_MAJOR }}.${{ env.VERSION_MINOR }} + ${{ env.IMAGE_TAG }}:${{ env.VERSION_MAJOR }}.${{ env.VERSION_MINOR }}.${{ env.VERSION_PATCH }} + ${{ env.IMAGE_TAG }}:latest diff --git a/.forgejo/workflows/release_rebuild.yaml b/.forgejo/workflows/release_rebuild.yaml index a062e89..2a2339f 100644 --- a/.forgejo/workflows/release_rebuild.yaml +++ b/.forgejo/workflows/release_rebuild.yaml @@ -24,6 +24,13 @@ jobs: - name: Set up Docker Buildx uses: docker/setup-buildx-action@v2 + - name: Login to Forgejo + uses: docker/login-action@v2 + with: + registry: ${{ env.FORGEJO_FQDN }} + username: ${{ secrets.FORGEJO_USER }} + password: ${{ secrets.FORGEJO_TOKEN }} + - name: Login to Docker Hub uses: docker/login-action@v2 with: @@ -35,7 +42,11 @@ jobs: with: push: true tags: | - ${{ env.IMAGE_TAG }}:${{ env.VERSION_MAJOR }} - ${{ env.IMAGE_TAG }}:${{ env.VERSION_MAJOR }}.${{ env.VERSION_MINOR }} - ${{ env.IMAGE_TAG }}:${{ env.VERSION_MAJOR }}.${{ env.VERSION_MINOR }}.${{ env.VERSION_PATCH }} - ${{ env.IMAGE_TAG }}:latest + ${{ env.IMAGE_TAG_PRIVATE }}:${{ env.VERSION_MAJOR }} + ${{ env.IMAGE_TAG_PRIVATE }}:${{ env.VERSION_MAJOR }}.${{ env.VERSION_MINOR }} + ${{ env.IMAGE_TAG_PRIVATE }}:${{ env.VERSION_MAJOR }}.${{ env.VERSION_MINOR }}.${{ env.VERSION_PATCH }} + ${{ env.IMAGE_TAG_PRIVATE }}:latest + ${{ env.IMAGE_TAG }}:${{ env.VERSION_MAJOR }} + ${{ env.IMAGE_TAG }}:${{ env.VERSION_MAJOR }}.${{ env.VERSION_MINOR }} + ${{ env.IMAGE_TAG }}:${{ env.VERSION_MAJOR }}.${{ env.VERSION_MINOR }}.${{ env.VERSION_PATCH }} + ${{ env.IMAGE_TAG }}:latest