From de8fed1f7f140746a4ce558cfd9218eb17e08f0a Mon Sep 17 00:00:00 2001 From: Raffaello Bonghi Date: Fri, 8 Apr 2022 22:53:47 +0100 Subject: [PATCH] Fix files output release --- .github/workflows/docker-image.yml | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/.github/workflows/docker-image.yml b/.github/workflows/docker-image.yml index 9145746..28dc7ab 100644 --- a/.github/workflows/docker-image.yml +++ b/.github/workflows/docker-image.yml @@ -136,10 +136,15 @@ jobs: - name: Extract tag name id: extract_tag shell: bash - run: echo ::set-output name=tag::${GITHUB_REF/refs\/tags\//} + run: | + if ${{ startsWith(github.ref, 'refs/tags/') }} ; then + echo ::set-output name=tag::${GITHUB_REF/refs\/tags\//} + else + echo ::set-output name=tag::${GITHUB_REF/refs\/heads\//} + fi - name: Discord notification env: DISCORD_WEBHOOK: ${{ secrets.DISCORD_WEBHOOK }} uses: Ilshidur/action-discord@master with: - args: 'The project **{{ EVENT_PAYLOAD.repository.full_name }}** has been deployed v${{ steps.extract_tag.outputs.tag }}.' + args: '**{{ EVENT_PAYLOAD.repository.full_name }}:${{ steps.extract_tag.outputs.tag }}** has been deployed!'