enh: better gh action messages

This commit is contained in:
Ben Allfree 2023-10-02 14:46:33 -07:00
parent 7da58229a2
commit 464ca9bac9

View File

@ -43,13 +43,16 @@ jobs:
branch: ${{ github.head_ref || github.ref_name }} branch: ${{ github.head_ref || github.ref_name }}
wranglerVersion: '3' 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 - name: Discord feature branch notification
if: github.ref_name != 'master' if: github.ref_name != 'master'
env: env:
DISCORD_WEBHOOK: ${{ secrets.DISCORD_WEBHOOK }} DISCORD_WEBHOOK: ${{ secrets.DISCORD_WEBHOOK }}
uses: Ilshidur/action-discord@master uses: Ilshidur/action-discord@master
with: 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 - name: Discord live branch notification
if: github.ref_name == 'master' if: github.ref_name == 'master'
@ -57,4 +60,4 @@ jobs:
DISCORD_WEBHOOK: ${{ secrets.DISCORD_WEBHOOK }} DISCORD_WEBHOOK: ${{ secrets.DISCORD_WEBHOOK }}
uses: Ilshidur/action-discord@master uses: Ilshidur/action-discord@master
with: 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 }})'