fixed: github action

This commit is contained in:
xxx 2023-11-15 15:00:35 +08:00
parent 893ab33811
commit 03403d2c33

View File

@ -38,7 +38,7 @@ jobs:
tags: | tags: |
${{ env.IMAGE_FQDN }}:${{ env.IMAGE_TAG }} ${{ env.IMAGE_FQDN }}:${{ env.IMAGE_TAG }}
env: env:
IMAGE_TAG: ${{ startsWith(github.ref, 'refs/heads/main') && 'latest' || startsWith(github.ref, 'refs/heads/dev') && 'dev' || github.ref_slug }} IMAGE_TAG: ${{ startsWith(github.ref, 'refs/heads/main') && 'latest' || startsWith(github.ref, 'refs/heads/dev') && 'dev' || github.ref_name }}
if: startsWith(github.ref, 'refs/heads/') if: startsWith(github.ref, 'refs/heads/')
- name: Build with Tag - name: Build with Tag
uses: docker/build-push-action@v3 uses: docker/build-push-action@v3
@ -47,5 +47,5 @@ jobs:
platforms: linux/amd64,linux/arm64 platforms: linux/amd64,linux/arm64
push: true push: true
tags: | tags: |
${{ env.IMAGE_FQDN }}:${{ github.ref }} ${{ env.IMAGE_FQDN }}:${{ github.ref_name }}
if: startsWith(github.ref, 'refs/tags/') if: startsWith(github.ref, 'refs/tags/')