From dc5e2fa32b026aa7f75bbbb63155b24284e7eb67 Mon Sep 17 00:00:00 2001 From: Varakh Date: Tue, 19 Nov 2024 12:59:35 +0100 Subject: [PATCH] Publish OCI image to Forgejo as well as to DockerHub and remove unnecessary use of revision LABEL --- .forgejo/workflows/release.yaml | 14 +++++++++++++- .forgejo/workflows/release_rebuild.yaml | 14 +++++++++++++- Dockerfile | 1 - 3 files changed, 26 insertions(+), 3 deletions(-) diff --git a/.forgejo/workflows/release.yaml b/.forgejo/workflows/release.yaml index d3348a7..7a98dbc 100644 --- a/.forgejo/workflows/release.yaml +++ b/.forgejo/workflows/release.yaml @@ -4,8 +4,9 @@ on: - master env: FB_VERSION: 4.0.2 - REVISION: ${{ github.sha }} IMAGE_TAG: varakh/filebin + IMAGE_TAG_PRIVATE: git.myservermanager.com/varakh/filebin + FORGEJO_FQDN: git.myservermanager.com VERSION_MAJOR: 4 VERSION_MINOR: 0 VERSION_PATCH: 2 @@ -26,6 +27,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: @@ -38,6 +46,10 @@ jobs: build-args: FB_VERSION=${{ env.FB_VERSION }} push: true tags: | + ${{ 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 }} diff --git a/.forgejo/workflows/release_rebuild.yaml b/.forgejo/workflows/release_rebuild.yaml index 5612c12..fe548ba 100644 --- a/.forgejo/workflows/release_rebuild.yaml +++ b/.forgejo/workflows/release_rebuild.yaml @@ -3,8 +3,9 @@ on: - cron: '0 0 1 * *' env: FB_VERSION: 4.0.2 - REVISION: ${{ github.sha }} IMAGE_TAG: varakh/filebin + IMAGE_TAG_PRIVATE: git.myservermanager.com/varakh/filebin + FORGEJO_FQDN: git.myservermanager.com VERSION_MAJOR: 4 VERSION_MINOR: 0 VERSION_PATCH: 2 @@ -25,6 +26,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: @@ -37,6 +45,10 @@ jobs: build-args: FB_VERSION=${{ env.FB_VERSION }} push: true tags: | + ${{ 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 }} diff --git a/Dockerfile b/Dockerfile index 77ced4e..ba055c7 100644 --- a/Dockerfile +++ b/Dockerfile @@ -28,7 +28,6 @@ COPY --from=builder /app/fb_src /var/www LABEL maintainer="Varakh " \ description="filebin" \ org.opencontainers.image.authors="Varakh" \ - org.opencontainers.image.revision="${REVISION}" \ org.opencontainers.image.vendor="Varakh" \ org.opencontainers.image.title="filebin" \ org.opencontainers.image.description="filebin" \