Use more maintained and capable Discord GHA

This commit is contained in:
Max Howell 2024-02-19 11:00:56 -05:00
parent 66cd7e7e79
commit 34f3ff3b26

View file

@ -42,17 +42,14 @@ jobs:
needs: [pkg, ingest]
runs-on: ubuntu-latest
steps:
- name: make embeds
id: make-embeds
- name: make paylaod
run: |
RV=""
for x in ${{ needs.ingest.outputs.projects }}; do
RV="${RV:+$RV,} {\"title\": \"$x\", \"url\": \"https://pkgx.dev/pkgs/$x\"}"
done
echo "json={\"embeds\": [$RV]}" >> $GITHUB_OUTPUT
- uses: Ilshidur/action-discord@0.3.2
env:
DISCORD_EMBEDS: ${{ steps.make-embeds.outputs.json }}
DISCORD_WEBHOOK: ${{ secrets.DISCORD_WEBHOOK }}
echo "{\"embeds\": [$RV], \"content\": \"new pkgs\"}" >> payload.json
- uses: tsickert/discord-webhook@v5.4.0
with:
args: new pkgs
webhook-url: ${{ secrets.DISCORD_WEBHOOK }}
raw-data: ./payload.json