prep 1.12 - toc & cl #15
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Push Commits to Discord Webhook | |
on: | |
push: | |
paths-ignore: | |
- '.github/**' | |
branches: | |
- "**" | |
tags: | |
- "!**" | |
jobs: | |
Discord_Notification: | |
runs-on: ubuntu-22.04 | |
env: | |
CF_API_KEY: ${{ secrets.CF_API_KEY }} | |
# WOWI_API_TOKEN: ${{ secrets.WOWI_API_TOKEN }} | |
# GITHUB_OAUTH: ${{ secrets.GITHUB_TOKEN }} | |
WAGO_API_TOKEN: ${{ secrets.WAGO_API_TOKEN }} | |
steps: | |
- name: Checkout Repository | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: Workaround checkout issues | |
run: | | |
git fetch --tags --force | |
- name: Set enviroment | |
shell: bash | |
run: | | |
echo "sha_short=$(git rev-parse --short "$GITHUB_SHA")" >> "$GITHUB_ENV" | |
echo "branch=$(echo ${GITHUB_REF#refs/heads/})" >> "$GITHUB_ENV" | |
- name: Discord Commits | |
uses: Sniddl/[email protected] | |
with: | |
webhook: ${{ secrets.DISCORD_COMMITS_WEBHOOK }} | |
message: "\u200B" | |
embed: '{"title": "**{{ commit.title }}**","description": "{{ commit.description }}\u200B","author": {"name": "{{ commit.author.username }}","icon_url": "https://github.com/{{ commit.author.username }}.png","url": "https://github.com/{{ commit.author.username }}"},"image": {"url": "https://repository-images.githubusercontent.com/482364703/3140862c-8faf-45cd-bd5f-7f62968dbd23"},"fields": [{"name": "AddOn","value": "[{{ github.context.payload.repository.name}}]({{ github.context.payload.repository.html_url }})","inline": true},{"name": "Branch","value": "${{ env.branch }}","inline": true},{"name": "SHA","value": "[${{ env.sha_short }}]({{ commit.url }})","inline": true},{"name": "Diff","value": "[Show Diff]({{ github.context.payload.compare }})","inline": true}]}' | |
- name: Package and release | |
uses: BigWigsMods/packager@master |