Skip to content

Auto Merge and Notify #41

Auto Merge and Notify

Auto Merge and Notify #41

Workflow file for this run

name: Auto Merge and Notify
run-name: Auto Merge and Notify
on:
push:
branches:
- master
permissions:
id-token: write
contents: write
checks: write
statuses: write
jobs:
merge_and_notify:
runs-on: ubuntu-latest
env:
TARGET_BRANCH: test_branch_name
steps:
- name: Checkout repository
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Merge changes
run: |
git fetch origin
git checkout $TARGET_BRANCH
git pull origin $TARGET_BRANCH
git merge ${{ github.ref }}
git push origin $TARGET_BRANCH || { echo "Merge failed"; exit 1; }
- name: Send Slack notification on failure
uses: slackapi/[email protected]
with:
channel-id: sdk-ci
slack-message: "Test message for merge branch '${{ github.ref }}' into '${{ env.TARGET_BRANCH }}'\n${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}"
env:
SLACK_BOT_TOKEN: ${{ secrets.SLACK_BOT_TOKEN }}
- name: Set link checker report details
uses: LouisBrunner/[email protected]
if: always()
with:
token: ${{ secrets.GITHUB_TOKEN }}
name: Link Check Run Details
conclusion: ${{ job.status }}
output: |
{"summary":"${{ steps.test.outputs.summary }}", "details_url": "https://cloudinary.com/documentation", "text_description": "Some dummy https://cloudinary.com/documentation"}
- name: Check annotations
run: |
echo "::notice title=Links Check Report ::https://github.com/your/repo/wiki/GHA-0001"