name: GSI Push Main Notification on: push: branches: - mdmathias-test jobs: notify-push: runs-on: ubuntu-latest steps: - name: Main Branch Push run: | echo "Workflow initiated by event with name: ${{ github.event_name }}" echo "Pushing commit to main: ${{ github.event.head_commit.id }}" echo "Pushed by: ${{ github.event.pusher.name }}" - name: Push Notification to Google Chat run: | curl --location --request POST '${{ secrets.WEBHOOK_URL }}' \ --header 'Content-Type: application/json' \ --data-raw '{ "cards": [ { "header": { "title": "Push to main branch", "subtitle": "${{ github.event.head_commit.message }}" }, "sections": [ { "widgets": [ { "keyValue": { "topLabel": "Repo", "content": "${{ github.event.repository.full_name }}" } }, { "keyValue": { "topLabel": "Committed by", "content": "${{ github.event.head_commit.author.username }}" } }, { "buttons": [ { "textButton": { "text": "Ref comparison", "onClick": { "openLink": { "url": "${{ github.event.compare }}" } } } } ] } ] } ] } ] }'