Skip to content

Commit 91a1c23

Browse files
Merge pull request #60 from technote-space/chore/chore-sync-workflows
chore: sync workflows
2 parents 9aa2cb5 + 3ccef07 commit 91a1c23

File tree

8 files changed

+58
-29
lines changed

8 files changed

+58
-29
lines changed

.github/workflow-settings.json

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
{
2+
"EXCLUDE_MESSAGES": [
3+
"update package version",
4+
"update packages",
5+
"update wp version",
6+
"trigger workflow",
7+
"update TOC"
8+
],
9+
"PROJECT": "Backlog",
10+
"ISSUE_COLUMN": "To do",
11+
"PR_COLUMN": "In progress",
12+
"PR_BODY_TITLE": "## Changes",
13+
"TOC_FOLDING": "1",
14+
"TOC_MAX_HEADER_LEVEL": "3",
15+
"TOC_TITLE": "Details",
16+
"BRANCH_PREFIX": "release/"
17+
}

.github/workflows/add-release-tag.yml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,12 +12,13 @@ jobs:
1212
runs-on: ubuntu-latest
1313
if: github.event.pull_request.merged == true && github.event.pull_request.head.user.id == github.event.pull_request.base.user.id && startsWith(github.head_ref, 'release/')
1414
steps:
15+
- uses: technote-space/load-config-action@v1
16+
with:
17+
CONFIG_FILENAME: workflow-settings.json
1518
- name: Get version
1619
uses: technote-space/get-next-version-action@v1
1720
with:
18-
EXCLUDE_MESSAGES: |
19-
update package version
20-
update packages
21+
EXCLUDE_MESSAGES: ${{ env.EXCLUDE_MESSAGES }}
2122
if: "! startsWith(github.head_ref, 'release/v')"
2223
- name: Get version
2324
run: echo "::set-env name=NEXT_VERSION::${HEAD_REF#release/}"

.github/workflows/ci.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ jobs:
8181
run: echo "::set-env name=RUNNING::"
8282
if: "! env.GIT_DIFF"
8383
- name: Set running flag
84-
if: matrix.node == '12' && github.ref == format('refs/heads/{0}', github.event.repository.default_branch)
84+
if: "matrix.node == '12' && ! startsWith(github.ref, 'refs/tags/') && github.event.base_ref == format('refs/heads/{0}', github.event.repository.default_branch)"
8585
run: echo "::set-env name=RUNNING::1"
8686
- name: Set running flag
8787
if: matrix.node == '12' && startsWith(github.ref, 'refs/tags/v')
@@ -232,7 +232,7 @@ jobs:
232232
env:
233233
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
234234
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
235-
if: success()
235+
if: success() && env.SLACK_WEBHOOK_URL
236236

237237
slack:
238238
name: Slack
@@ -247,4 +247,4 @@ jobs:
247247
env:
248248
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
249249
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
250-
if: env.WORKFLOW_CONCLUSION == 'failure'
250+
if: env.WORKFLOW_CONCLUSION == 'failure' && env.SLACK_WEBHOOK_URL

.github/workflows/issue-opened.yml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,13 @@ jobs:
99
name: Assign issues to project
1010
runs-on: ubuntu-latest
1111
steps:
12+
- uses: technote-space/load-config-action@v1
13+
with:
14+
CONFIG_FILENAME: workflow-settings.json
1215
- uses: technote-space/create-project-card-action@v1
1316
with:
14-
PROJECT: Backlog
15-
COLUMN: To do
17+
PROJECT: ${{ env.PROJECT }}
18+
COLUMN: ${{ env.ISSUE_COLUMN }}
1619

1720
assignAuthor:
1821
name: Assign author to issue

.github/workflows/pr-opened.yml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,13 @@ jobs:
1010
name: Assign PullRequest to Project
1111
runs-on: ubuntu-latest
1212
steps:
13+
- uses: technote-space/load-config-action@v1
14+
with:
15+
CONFIG_FILENAME: workflow-settings.json
1316
- uses: technote-space/create-project-card-action@v1
1417
with:
15-
PROJECT: Backlog
16-
COLUMN: In progress
18+
PROJECT: ${{ env.PROJECT }}
19+
COLUMN: ${{ env.PR_COLUMN }}
1720
GITHUB_TOKEN: ${{ secrets.ACCESS_TOKEN }}
1821

1922
assignAuthor:

.github/workflows/pr-updated.yml

Lines changed: 13 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -17,14 +17,13 @@ jobs:
1717
runs-on: ubuntu-latest
1818
if: github.event.pull_request.head.user.id == github.event.pull_request.base.user.id
1919
steps:
20+
- uses: technote-space/load-config-action@v1
21+
with:
22+
CONFIG_FILENAME: workflow-settings.json
2023
- uses: technote-space/pr-commit-body-action@v1
2124
with:
22-
EXCLUDE_MESSAGES: |
23-
trigger workflow
24-
update TOC
25-
update package version
26-
update wp version
27-
TITLE: '## Changes'
25+
EXCLUDE_MESSAGES: ${{ env.EXCLUDE_MESSAGES }}
26+
TITLE: ${{ env.PR_BODY_TITLE }}
2827
LINK_ISSUE_KEYWORD: ${{ (startsWith(github.head_ref, 'release/') && 'closes') || '' }}
2928
FILTER_PR: true
3029

@@ -33,18 +32,22 @@ jobs:
3332
runs-on: ubuntu-latest
3433
if: "github.event.pull_request.head.user.id == github.event.pull_request.base.user.id && startsWith(github.head_ref, 'release/') && ! startsWith(github.head_ref, 'release/v')"
3534
steps:
35+
- uses: technote-space/load-config-action@v1
36+
with:
37+
CONFIG_FILENAME: workflow-settings.json
3638
- uses: technote-space/release-type-action@v1
3739
with:
40+
EXCLUDE_MESSAGES: ${{ env.EXCLUDE_MESSAGES }}
3841
GITHUB_TOKEN: ${{ secrets.ACCESS_TOKEN }}
39-
EXCLUDE_MESSAGES: |
40-
update package version
41-
update packages
4242

4343
checkVersion:
4444
name: Check package version
4545
runs-on: ubuntu-latest
4646
if: "github.event.action == 'synchronize' && github.event.pull_request.head.user.id == github.event.pull_request.base.user.id && startsWith(github.head_ref, 'release/') && ! startsWith(github.head_ref, 'release/v')"
4747
steps:
48+
- uses: technote-space/load-config-action@v1
49+
with:
50+
CONFIG_FILENAME: workflow-settings.json
4851
- name: Set running flag
4952
run: echo "::set-env name=RUNNING::1"
5053
- uses: actions/checkout@v2
@@ -57,9 +60,7 @@ jobs:
5760
- name: Get version
5861
uses: technote-space/get-next-version-action@v1
5962
with:
60-
EXCLUDE_MESSAGES: |
61-
update package version
62-
update packages
63+
EXCLUDE_MESSAGES: ${{ env.EXCLUDE_MESSAGES }}
6364
if: env.RUNNING
6465
- name: Check package version
6566
uses: technote-space/package-version-check-action@v1

.github/workflows/toc.yml

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,13 @@ jobs:
1010
name: TOC Generator
1111
runs-on: ubuntu-latest
1212
steps:
13+
- uses: technote-space/load-config-action@v1
14+
with:
15+
CONFIG_FILENAME: workflow-settings.json
1316
- uses: technote-space/toc-generator@v2
1417
with:
1518
GITHUB_TOKEN: ${{ secrets.ACCESS_TOKEN }}
16-
TARGET_BRANCH_PREFIX: release/
17-
FOLDING: true
18-
MAX_HEADER_LEVEL: 3
19-
TOC_TITLE: Details
19+
TARGET_BRANCH_PREFIX: ${{ env.BRANCH_PREFIX }}
20+
FOLDING: ${{ env.TOC_FOLDING }}
21+
MAX_HEADER_LEVEL: ${{ env.TOC_MAX_HEADER_LEVEL }}
22+
TOC_TITLE: ${{ env.TOC_TITLE }}

.github/workflows/update-dependencies.yml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,9 @@ jobs:
1212
name: Update npm dependencies
1313
runs-on: ubuntu-latest
1414
steps:
15+
- uses: technote-space/load-config-action@v1
16+
with:
17+
CONFIG_FILENAME: workflow-settings.json
1518
- uses: technote-space/auto-cancel-redundant-job@v1
1619
with:
1720
EXCLUDE_MERGED: 'true'
@@ -49,9 +52,7 @@ jobs:
4952
- name: Get version
5053
uses: technote-space/get-next-version-action@v1
5154
with:
52-
EXCLUDE_MESSAGES: |
53-
update package version
54-
update packages
55+
EXCLUDE_MESSAGES: ${{ env.EXCLUDE_MESSAGES }}
5556
if: "env.RUNNING && ! startsWith(github.head_ref, 'release/v')"
5657
- name: Get version
5758
run: echo "::set-env name=NEXT_VERSION::${HEAD_REF#release/}"

0 commit comments

Comments
 (0)