diff --git a/.github/workflows/publish.yaml b/.github/workflows/publish.yaml index e1468003..38c4112b 100644 --- a/.github/workflows/publish.yaml +++ b/.github/workflows/publish.yaml @@ -43,13 +43,16 @@ jobs: branch: ${{ github.head_ref || github.ref_name }} wranglerVersion: '3' + - name: Add SHORT_SHA env property with commit short sha + run: echo "SHORT_SHA=`echo ${GITHUB_SHA} | cut -c1-8`" >> $GITHUB_ENV + - name: Discord feature branch notification if: github.ref_name != 'master' env: DISCORD_WEBHOOK: ${{ secrets.DISCORD_WEBHOOK }} uses: Ilshidur/action-discord@master with: - args: '**PREVIEW** ${{ steps.www_deploy.outputs.url }} and ${{ steps.dashboard_deploy.outputs.url }} were generated from [commit ${{ github.sha }}](https://github.com/${{ github.repository}}/commit/${{ github.sha }}) on [${{ github.repository}}#${{ github.ref_name }}](https://github.com/${{ github.repository}}/tree/${{ github.ref_name }})' + args: '**PREVIEW** ${{ steps.www_deploy.outputs.url }} and ${{ steps.dashboard_deploy.outputs.url }} were generated from [${SHORT_SHA}](https://github.com/${{ github.repository}}/commit/${{ github.sha }}) on [${{ github.repository}}#${{ github.ref_name }}](https://github.com/${{ github.repository}}/tree/${{ github.ref_name }})' - name: Discord live branch notification if: github.ref_name == 'master' @@ -57,4 +60,4 @@ jobs: DISCORD_WEBHOOK: ${{ secrets.DISCORD_WEBHOOK }} uses: Ilshidur/action-discord@master with: - args: '**LIVE** https://pockethost.io (${{ steps.www_deploy.outputs.url }}) and https://app.pockethost.io (${{ steps.dashboard_deploy.outputs.url }}) were updated from [commit ${{ github.sha }}](https://github.com/${{ github.repository}}/commit/${{ github.sha }}) on [${{ github.repository}}#${{ github.ref_name }}](https://github.com/${{ github.repository}}/tree/${{ github.ref_name }})' + args: '**LIVE** https://pockethost.io ([permalink](${{ steps.www_deploy.outputs.url }})) and https://app.pockethost.io ([permalink](${{ steps.dashboard_deploy.outputs.url }})) were updated from [${SHORT_SHA}](https://github.com/${{ github.repository}}/commit/${{ github.sha }}) on [${{ github.repository}}#${{ github.ref_name }}](https://github.com/${{ github.repository}}/tree/${{ github.ref_name }})'