-
Notifications
You must be signed in to change notification settings - Fork 0
55 lines (47 loc) · 1.66 KB
/
hello.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
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"