这是indexloc提供的服务,不要输入任何密码
Skip to content

Delete assets/Solace_Logo_Green.png #2

Delete assets/Solace_Logo_Green.png

Delete assets/Solace_Logo_Green.png #2

Workflow file for this run

name: Trigger Zap on Main Branch Merge
on:
push:
branches:
- main
jobs:
trigger-webhook:
runs-on: ubuntu-latest
# Only run this workflow if the repository is public
if: github.event.repository.private == false
steps:
- name: Check out repository
uses: actions/checkout@v3
with:
fetch-depth: 2 # To get the commit message from the last commit
- name: Get commit message
id: get_commit_message
run: |
COMMIT_MESSAGE=$(git log -1 --pretty=format:%B)
COMMIT_MESSAGE="${COMMIT_MESSAGE//'%'/'%25'}"
COMMIT_MESSAGE="${COMMIT_MESSAGE//$'\n'/'%0A'}"
COMMIT_MESSAGE="${COMMIT_MESSAGE//$'\r'/'%0D'}"
echo "::set-output name=message::$COMMIT_MESSAGE"
# For newer GitHub Actions:
echo "message=$COMMIT_MESSAGE" >> $GITHUB_OUTPUT
- name: Send webhook
uses: distributhor/workflow-webhook@v3
with:
webhook_url: ${{ secrets.ZAPIER_TWEET_URL }}
webhook_secret: ${{ secrets.ZAPIER_TWEET_URL_SECRET }}
data: '{"commit_message": "${{ steps.get_commit_message.outputs.message }}"}'
content_type: application/json