Skip to content
This repository was archived by the owner on Aug 1, 2021. It is now read-only.

Commit 0497921

Browse files
Merge pull request #317 from technote-space/chore/chore-sync-workflows
chore: sync workflows
2 parents 9d59763 + 7afbe3a commit 0497921

File tree

8 files changed

+57
-31
lines changed

8 files changed

+57
-31
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: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,7 @@ jobs:
161161
run: echo "::set-env name=RUNNING::"
162162
if: "! env.GIT_DIFF"
163163
- name: Set running flag
164-
if: matrix.node == '12' && github.ref == format('refs/heads/{0}', github.event.repository.default_branch)
164+
if: "matrix.node == '12' && ! startsWith(github.ref, 'refs/tags/') && github.event.base_ref == format('refs/heads/{0}', github.event.repository.default_branch)"
165165
run: echo "::set-env name=RUNNING::1"
166166
- name: Set running flag
167167
if: matrix.node == '12' && startsWith(github.ref, 'refs/tags/v')
@@ -245,7 +245,7 @@ jobs:
245245
run: echo "::set-env name=RUNNING::"
246246
if: "! env.GIT_DIFF"
247247
- name: Set running flag
248-
if: matrix.ACTIVATE_POPULAR_PLUGINS == 1 && github.ref == format('refs/heads/{0}', github.event.repository.default_branch)
248+
if: "matrix.ACTIVATE_POPULAR_PLUGINS == 1 && ! startsWith(github.ref, 'refs/tags/') && github.event.base_ref == format('refs/heads/{0}', github.event.repository.default_branch)"
249249
run: echo "::set-env name=RUNNING::1"
250250
- name: Set running flag
251251
if: matrix.ACTIVATE_POPULAR_PLUGINS == 1 && startsWith(github.ref, 'refs/tags/v')
@@ -405,7 +405,7 @@ jobs:
405405
env:
406406
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
407407
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
408-
if: success()
408+
if: success() && env.SLACK_WEBHOOK_URL
409409

410410
slack:
411411
name: Slack
@@ -420,4 +420,4 @@ jobs:
420420
env:
421421
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
422422
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
423-
if: env.WORKFLOW_CONCLUSION == 'failure'
423+
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: 6 additions & 3 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:
@@ -26,4 +29,4 @@ jobs:
2629
name: PR Labeler
2730
runs-on: ubuntu-latest
2831
steps:
29-
- uses: technote-space/pr-labeler-action@v3
32+
- uses: technote-space/pr-labeler-action@v4

.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: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,15 +22,13 @@ jobs:
2222
with:
2323
EXCLUDE_MERGED: 'true'
2424
- name: Update dependencies
25-
uses: technote-space/create-pr-action@v1
25+
uses: technote-space/create-pr-action@v2
2626
with:
2727
GITHUB_TOKEN: ${{ secrets.ACCESS_TOKEN }}
2828
EXECUTE_COMMANDS: |
2929
composer bin:download
3030
composer bin:update
3131
COMMIT_MESSAGE: 'chore: update dependencies'
32-
PR_BRANCH_NAME: 'chore-update-${PR_ID}'
33-
PR_TITLE: 'chore: update dependencies (${PR_MERGE_REF})'
3432
PR_DEFAULT_BRANCH_PREFIX: release/
3533
PR_DEFAULT_BRANCH_NAME: next-${CURRENT_VERSION}
3634
PR_DEFAULT_BRANCH_TITLE: 'feat: release'

0 commit comments

Comments
 (0)