generated from actions/typescript-action
-
Notifications
You must be signed in to change notification settings - Fork 2
81 lines (68 loc) · 2.76 KB
/
example.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
name: 'example'
on: push
env:
DEPLOYMENT_RECORD_ISSUE_NUMBER: 28
permissions:
issues: write
jobs:
example:
runs-on: ubuntu-latest
steps:
# Expect issue status at started.
# - Label : (None)
# - Assignee: (None)
- uses: Connehito/deploying-marker-with-issue@main
env:
GITHUB_TOKEN: ${{ github.token }}
with:
action: "check-marker-detached"
issue-number: ${{ env.DEPLOYMENT_RECORD_ISSUE_NUMBER }}
exit-with-error: true # true = exit with error when the marker is already exists
- uses: Connehito/deploying-marker-with-issue@main
env:
GITHUB_TOKEN: ${{ github.token }}
with:
action: "attach-marker"
issue-number: ${{ env.DEPLOYMENT_RECORD_ISSUE_NUMBER }}
exit-with-error: true # true = exit with error when the marker is already exists
# Issue status at this time
# - Label : Deploying
# - Assignee: $ACTOR
- uses: Connehito/deploying-marker-with-issue@main
env:
GITHUB_TOKEN: ${{ github.token }}
with:
action: "check-marker-detached-or-assigned-actor"
issue-number: ${{ env.DEPLOYMENT_RECORD_ISSUE_NUMBER }}
exit-with-error: true # true = exit with error when the marker is already exists and assigned a user who is not the actor
- uses: Connehito/deploying-marker-with-issue@main
env:
GITHUB_TOKEN: ${{ github.token }}
with:
action: "check-marker-attached"
issue-number: ${{ env.DEPLOYMENT_RECORD_ISSUE_NUMBER }}
exit-with-error: true # true = exit with error when the marker is not exists
- uses: Connehito/deploying-marker-with-issue@main
env:
GITHUB_TOKEN: ${{ github.token }}
with:
action: "detach-marker"
issue-number: ${{ env.DEPLOYMENT_RECORD_ISSUE_NUMBER }}
exit-with-error: false # true = exit with error when the marker is not exists
# Issue status at this time
# - Label : (None)
# - Assignee: (None)
- name: Set ref link
run: |
if [[ "${GITHUB_REF_TYPE}" == "branch" ]]; then
echo "REF_LINK=[${GITHUB_SHA:0:8}](https://github.com/${GITHUB_REPOSITORY}/commit/${GITHUB_SHA})" >> "${GITHUB_ENV}"
elif [[ "${GITHUB_REF_TYPE}" == "tag" ]]; then
echo "REF_LINK=[${GITHUB_REF_NAME}](https://github.com/${GITHUB_REPOSITORY}/releases/tag/${GITHUB_REF_NAME})" >> "${GITHUB_ENV}"
fi
- name: Create comment
uses: peter-evans/create-or-update-comment@v3
with:
issue-number: ${{ env.DEPLOYMENT_RECORD_ISSUE_NUMBER }}
body: |
@${{ github.actor }}
`example.yml` workflow finished by ${{ env.REF_LINK }}