1
0
mirror of https://github.com/AllanWang/Frost-for-Facebook.git synced 2024-09-19 15:11:42 +02:00

Add discord hook (#1801)

* Add discord hook

* Add embed color and new message

* Fix substitution

* Fix substitution

* Test

* Dec color

* Test

* Test

* Test

* Test

* Test

* Test

* Test

* Test

* Test

* Test

* Test

* Test

* Test

* Test

* Test

* Test

* Test

* Enable full flow [skip ci]
This commit is contained in:
Allan Wang 2021-09-12 02:45:36 -07:00 committed by GitHub
parent caa923afed
commit c9809793af
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -190,7 +190,20 @@ jobs:
- name: Echo Result
if: ${{ env.SHOULD_RELEASE == 'true' }}
run: echo "Created release at https://github.com/${{ env.OWNER }}/${{ env.REPO }}/releases/tag/v${{ env.RELEASE_ID_NUMBER }}"
run: |
TEST_RELEASE_URL="https://github.com/${{ env.OWNER }}/${{ env.REPO }}/releases/tag/v${{ env.RELEASE_ID_NUMBER }}"
echo "Created release at $TEST_RELEASE_URL"
echo "TEST_RELEASE_URL=${TEST_RELEASE_URL}" >> $GITHUB_ENV
- name: Discord Ping
uses: Sniddl/discord-commits@v1.3
with:
webhook: ${{ secrets.DISCORD_WEBHOOK }}
# Frost Blue: 0xff3b5998 / 3889560
embed: '{"title":"Frost v{{ env.RELEASE_ID_NUMBER }}","color":3889560,"url":"{{ commit.url }}","author":{"name":"{{ github.context.payload.repository.owner.login }}","icon_url":"{{ github.context.payload.repository.owner.avatar_url }}"},"fields":[{"name":"Test Release","value":"{{ env.TEST_RELEASE_URL }}"},{"name":"Action CI","value":"https://github.com/{{ github.context.payload.repository.full_name }}/actions/runs/{{ env.RUN_ID }}"}]}'
last-commit-only: false
env:
RUN_ID: ${{ github.RUN_ID }}