From 7bf9655022c2aea7342f11b85abb6fab2b853405 Mon Sep 17 00:00:00 2001 From: Rongrong Date: Sat, 11 Nov 2023 01:51:23 +0800 Subject: [PATCH] ci: publish exp-deps image for all non-master branches Signed-off-by: Rongrong --- .github/workflows/publish-docker-image.yml | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/.github/workflows/publish-docker-image.yml b/.github/workflows/publish-docker-image.yml index d0d616d5a1..0e753d0454 100644 --- a/.github/workflows/publish-docker-image.yml +++ b/.github/workflows/publish-docker-image.yml @@ -52,25 +52,25 @@ jobs: cache-from: type=gha,scope=docker-release cache-to: type=gha,scope=docker-release,mode=max - name: Set Docker meta (exp-deps) - if: ${{ endsWith(github.ref, 'dev') }} - id: meta-fpe + if: ${{ startsWith(github.ref, 'refs/heads') && github.ref_name != 'master' }} + id: meta-exp uses: docker/metadata-action@v5 with: images: ${{ secrets.DOCKER_USERNAME }}/rss-to-telegram flavor: latest=false - tags: type=raw,value=exp-deps,enable=true + tags: type=raw,value=${{ github.ref_name != 'dev' && format('{0}-', github.ref_name) || '' }}exp-deps,enable=true - name: Push to Docker Hub (exp-deps) - if: ${{ endsWith(github.ref, 'dev') }} + if: ${{ startsWith(github.ref, 'refs/heads') && github.ref_name != 'master' }} uses: docker/build-push-action@v5 with: push: true context: . build-args: EXP_DEPS=1 platforms: linux/amd64,linux/arm64 - tags: ${{ steps.meta-fpe.outputs.tags }} - labels: ${{ steps.meta-fpe.outputs.labels }} - cache-from: type=registry,ref=${{ secrets.DOCKER_USERNAME }}/rss-to-telegram:exp-deps - cache-to: type=inline,ref=${{ secrets.DOCKER_USERNAME }}/rss-to-telegram:exp-deps + tags: ${{ steps.meta-exp.outputs.tags }} + labels: ${{ steps.meta-exp.outputs.labels }} + cache-from: type=registry,ref=${{ steps.meta-exp.outputs.tags[0] }} + cache-to: type=inline description: name: Update repository description on Docker Hub