This repository has been archived by the owner on Nov 3, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 140
89 lines (77 loc) · 2.9 KB
/
json.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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
name: JSON check
on:
pull_request_target:
jobs:
json:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
ref: "refs/pull/${{ github.event.pull_request.number }}/merge"
- name: json-syntax-check
uses: limitusus/json-syntax-check@v1
with:
pattern: "\\.json$"
- name: Comment PR
uses: unofficial-skills/actions-comment-pull-request@main
with:
message: |
✅ Welcome your PR has been validated successfully.
GITHUB_TOKEN: ${{ secrets.BOT }}
auto:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
ref: "refs/pull/${{ github.event.pull_request.number }}/merge"
- name: Expose git commit data
uses: rlespinasse/[email protected]
- name: Print git commit data
run: |
echo "Get author info"
echo " - ${{ env.GIT_COMMIT_AUTHOR }}"
echo " - ${{ env.GIT_COMMIT_AUTHOR_NAME }}"
echo " - ${{ env.GIT_COMMIT_AUTHOR_EMAIL }}"
echo "Get committer info"
echo " - ${{ env.GIT_COMMIT_COMMITTER }}"
echo " - ${{ env.GIT_COMMIT_COMMITTER_NAME }}"
echo " - ${{ env.GIT_COMMIT_COMMITTER_EMAIL }}"
echo "Get message info"
echo " - ${{ env.GIT_COMMIT_MESSAGE_SUBJECT }}"
echo " - ${{ env.GIT_COMMIT_MESSAGE_SUBJECT_SANITIZED }}"
echo " - ${{ env.GIT_COMMIT_MESSAGE_BODY }}"
- name: andrew
if: env.GIT_COMMIT_AUTHOR_NAME == 'andrewstech'
uses: alexwilson/enable-github-automerge-action@main
with:
github-token: "${{ secrets.BOT }}"
- name: Comment PR
if: env.GIT_COMMIT_AUTHOR_NAME == 'andrewstech'
uses: unofficial-skills/actions-comment-pull-request@main
with:
message: |
✅ Welcome Andrew your PR will be auto merged when CI passes.
GITHUB_TOKEN: ${{ secrets.BOT }}
- name: blue
if: env.GIT_COMMIT_AUTHOR_NAME == 'blueedgetechno'
uses: alexwilson/enable-github-automerge-action@main
with:
github-token: "${{ secrets.BOT }}"
- name: Comment PR
if: env.GIT_COMMIT_AUTHOR_NAME == 'blueedgetechno'
uses: unofficial-skills/actions-comment-pull-request@main
with:
message: |
✅ Welcome Blue your PR will be auto merged when CI passes.
GITHUB_TOKEN: ${{ secrets.BOT }}
run-if-fail:
if: ${{ always() && (needs.json.result=='failure') }}
needs: [json]
runs-on: ubuntu-latest
steps:
- name: Comment PR
uses: unofficial-skills/actions-comment-pull-request@main
with:
message: |
❌ Storing of the JSON file has failed due to verification issues
GITHUB_TOKEN: ${{ secrets.BOT }}