From fc98377c9a077b1d68ae49af1052955d4bb1798c Mon Sep 17 00:00:00 2001 From: guochao Date: Wed, 19 Feb 2025 20:05:16 +0800 Subject: [PATCH] alter workflow to push different tags --- .gitea/workflows/container-build.yaml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/.gitea/workflows/container-build.yaml b/.gitea/workflows/container-build.yaml index d7938ac..9979bfd 100644 --- a/.gitea/workflows/container-build.yaml +++ b/.gitea/workflows/container-build.yaml @@ -41,5 +41,9 @@ jobs: - name: Login to Container Registry run: echo "${{ secrets.ACTION_PACKAGE_WRITE_TOKEN }}" | podman login ${{ github.server_url }} -u ${{ github.repository_owner }} --password-stdin - name: Push Container Image - run: REGISTRY=${{ github.server_url}}; REGISTRY=${REGISTRY##https://}; REGISTRY=${REGISTRY##http://}; podman push --log-level=trace $REGISTRY/${{ github.repository }} + run: REGISTRY=${{ github.server_url}}; REGISTRY=${REGISTRY##https://}; REGISTRY=${REGISTRY##http://}; podman push $REGISTRY/${{ github.repository }} docker://$REGISTRY/${{ github.repository }}:dev + if: ${{ github.ref_type == "branch" && github.ref_name == "master" }} + - name: Push Container Image with Tag and Update latest image + run: REGISTRY=${{ github.server_url}}; REGISTRY=${REGISTRY##https://}; REGISTRY=${REGISTRY##http://}; podman push $REGISTRY/${{ github.repository }}; podman push $REGISTRY/${{ github.repository }} docker://$REGISTRY/${{ github.repository }}:${{ github.ref_name }} + if: ${{ github.ref_type == "tag" }}