From 2a7df3d41397d4d5557482124e9538a63ab7ec23 Mon Sep 17 00:00:00 2001 From: Luke Tainton Date: Thu, 2 Jan 2025 18:32:06 +0000 Subject: [PATCH] fix(ci): use metadata module to extract tags --- .gitea/workflows/release.yml | 44 +++++++++++++++++++++--------------- 1 file changed, 26 insertions(+), 18 deletions(-) diff --git a/.gitea/workflows/release.yml b/.gitea/workflows/release.yml index 4e68b69..ceafe48 100644 --- a/.gitea/workflows/release.yml +++ b/.gitea/workflows/release.yml @@ -128,23 +128,31 @@ jobs: images: | ghcr.io/${{ vars.GHCR_USERNAME }}/webexmemebot ${{ vars.PACKAGES_REGISTRY_URL }}/${{ gitea.repository }} - tags: type=semver,pattern=v{{version}},value=${{ needs.create_release.outputs.release_name }} - - - name: Build images - uses: docker/build-push-action@v6 - with: - context: . - push: false - labels: ${{ steps.meta.outputs.labels }} tags: | - ${{ vars.PACKAGES_REGISTRY_URL }}/${{ gitea.repository }}:latest - ${{ vars.PACKAGES_REGISTRY_URL }}/${{ gitea.repository }}:${{ needs.create_release.outputs.release_name }} - ghcr.io/${{ vars.GHCR_USERNAME }}/webexmemebot:latest - ghcr.io/${{ vars.GHCR_USERNAME }}/webexmemebot:${{ needs.create_release.outputs.release_name }} + type=raw,value=latest + type=semver,pattern=v{{version}},value=${{ needs.create_release.outputs.release_name }} - - name: Push images - run: | - docker push ${{ vars.PACKAGES_REGISTRY_URL }}/${{ gitea.repository }}:latest - docker push ${{ vars.PACKAGES_REGISTRY_URL }}/${{ gitea.repository }}:${{ needs.create_release.outputs.release_name }} - docker push ghcr.io/${{ vars.GHCR_USERNAME }}/webexmemebot:latest - docker push ghcr.io/${{ vars.GHCR_USERNAME }}/webexmemebot:${{ needs.create_release.outputs.release_name }} + - name: Build and push imagse + uses: docker/build-push-action@v5 + with: + build-args: | + DOCKER_METADATA_OUTPUT_JSON + + # - name: Build images + # uses: docker/build-push-action@v6 + # with: + # context: . + # push: false + # labels: ${{ steps.meta.outputs.labels }} + # tags: | + # ${{ vars.PACKAGES_REGISTRY_URL }}/${{ gitea.repository }}:latest + # ${{ vars.PACKAGES_REGISTRY_URL }}/${{ gitea.repository }}:${{ needs.create_release.outputs.release_name }} + # ghcr.io/${{ vars.GHCR_USERNAME }}/webexmemebot:latest + # ghcr.io/${{ vars.GHCR_USERNAME }}/webexmemebot:${{ needs.create_release.outputs.release_name }} + + # - name: Push images + # run: | + # docker push ${{ vars.PACKAGES_REGISTRY_URL }}/${{ gitea.repository }}:latest + # docker push ${{ vars.PACKAGES_REGISTRY_URL }}/${{ gitea.repository }}:${{ needs.create_release.outputs.release_name }} + # docker push ghcr.io/${{ vars.GHCR_USERNAME }}/webexmemebot:latest + # docker push ghcr.io/${{ vars.GHCR_USERNAME }}/webexmemebot:${{ needs.create_release.outputs.release_name }}