🏷️ add card base type (#40) #146
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: 👷 Main | |
on: | |
push: | |
branches: [main] | |
jobs: | |
check: | |
uses: ./.github/workflows/check.yml | |
secrets: inherit | |
notify: | |
needs: check | |
if: always() | |
runs-on: ubuntu-latest | |
steps: | |
- name: Set Timezone to Taipei | |
run: sudo ln -sf /usr/share/zoneinfo/Asia/Taipei /etc/localtime | |
- name: Output CONTENT | |
id: CONTENT | |
run: | | |
COMMIT_MESSAGE="${{ github.event.head_commit.message }}" | |
ESCAPED_COMMIT_MESSAGE=$(echo "$COMMIT_MESSAGE" | jq -s -R -r @json) | |
echo "content=[{\"title\": \"Main Has New Commit\", \"url\": \"https://github.com/${{ github.repository }}\", \"description\": \"## Main updated Please pull the latest commit\",\"fields\": [{\"name\": \"Commit Message\", \"value\": $ESCAPED_COMMIT_MESSAGE }, {\"name\": \"Owner\", \"value\": \"${{ github.event.head_commit.author.username }}\"}, {\"name\": \"Trigger Actor\", \"value\": \"${{ github.triggering_actor }}\"}, {\"name\": \"Status\", \"value\": \"${{ needs.check.result == 'failure' && 'Failure' || 'Success' }}\"}], \"footer\": {\"text\": \"created at ${{ github.event.head_commit.timestamp }}\"}}]" >> $GITHUB_OUTPUT | |
- run: | | |
echo ${{ steps.CONTENT.outputs.content }} | |
- name: Can Review PR | |
env: | |
DISCORD_WEBHOOK: ${{ secrets.DISCORD_WEBHOOK }} | |
DISCORD_USERNAME: GitHub Actions | |
DISCORD_AVATAR: https://avatars.githubusercontent.com/u/44036562?s=200&v=4 | |
DISCORD_EMBEDS: ${{ steps.CONTENT.outputs.content }} | |
uses: Ilshidur/action-discord@master | |
with: | |
args: "" |