Skip to content

chore: sync workflows #267

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Mar 23, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 17 additions & 0 deletions .github/workflow-settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
{
"EXCLUDE_MESSAGES": [
"update package version",
"update packages",
"update wp version",
"trigger workflow",
"update TOC"
],
"PROJECT": "Backlog",
"ISSUE_COLUMN": "To do",
"PR_COLUMN": "In progress",
"PR_BODY_TITLE": "## Changes",
"TOC_FOLDING": "1",
"TOC_MAX_HEADER_LEVEL": "3",
"TOC_TITLE": "Details",
"BRANCH_PREFIX": "release/"
}
7 changes: 4 additions & 3 deletions .github/workflows/add-release-tag.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,13 @@ jobs:
runs-on: ubuntu-latest
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/')
steps:
- uses: technote-space/load-config-action@v1
with:
CONFIG_FILENAME: workflow-settings.json
- name: Get version
uses: technote-space/get-next-version-action@v1
with:
EXCLUDE_MESSAGES: |
update package version
update packages
EXCLUDE_MESSAGES: ${{ env.EXCLUDE_MESSAGES }}
if: "! startsWith(github.head_ref, 'release/v')"
- name: Get version
run: echo "::set-env name=NEXT_VERSION::${HEAD_REF#release/}"
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/broken-link-check.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
on:
schedule:
- cron: 0 0 1 * *
- cron: 0 0 6 * *
repository_dispatch:
types: [check-link]

Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ jobs:
run: echo "::set-env name=RUNNING::"
if: "! env.GIT_DIFF"
- name: Set running flag
if: matrix.node == '12' && github.ref == format('refs/heads/{0}', github.event.repository.default_branch)
if: "matrix.node == '12' && ! startsWith(github.ref, 'refs/tags/') && github.event.base_ref == format('refs/heads/{0}', github.event.repository.default_branch)"
run: echo "::set-env name=RUNNING::1"
- name: Set running flag
if: matrix.node == '12' && startsWith(github.ref, 'refs/tags/v')
Expand Down Expand Up @@ -232,7 +232,7 @@ jobs:
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
if: success()
if: success() && env.SLACK_WEBHOOK_URL

slack:
name: Slack
Expand All @@ -247,4 +247,4 @@ jobs:
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
if: env.WORKFLOW_CONCLUSION == 'failure'
if: env.WORKFLOW_CONCLUSION == 'failure' && env.SLACK_WEBHOOK_URL
7 changes: 5 additions & 2 deletions .github/workflows/issue-opened.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,13 @@ jobs:
name: Assign issues to project
runs-on: ubuntu-latest
steps:
- uses: technote-space/load-config-action@v1
with:
CONFIG_FILENAME: workflow-settings.json
- uses: technote-space/create-project-card-action@v1
with:
PROJECT: Backlog
COLUMN: To do
PROJECT: ${{ env.PROJECT }}
COLUMN: ${{ env.ISSUE_COLUMN }}

assignAuthor:
name: Assign author to issue
Expand Down
9 changes: 6 additions & 3 deletions .github/workflows/pr-opened.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,13 @@ jobs:
name: Assign PullRequest to Project
runs-on: ubuntu-latest
steps:
- uses: technote-space/load-config-action@v1
with:
CONFIG_FILENAME: workflow-settings.json
- uses: technote-space/create-project-card-action@v1
with:
PROJECT: Backlog
COLUMN: In progress
PROJECT: ${{ env.PROJECT }}
COLUMN: ${{ env.PR_COLUMN }}
GITHUB_TOKEN: ${{ secrets.ACCESS_TOKEN }}

assignAuthor:
Expand All @@ -26,4 +29,4 @@ jobs:
name: PR Labeler
runs-on: ubuntu-latest
steps:
- uses: technote-space/pr-labeler-action@v3
- uses: technote-space/pr-labeler-action@v4
25 changes: 13 additions & 12 deletions .github/workflows/pr-updated.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,13 @@ jobs:
runs-on: ubuntu-latest
if: github.event.pull_request.head.user.id == github.event.pull_request.base.user.id
steps:
- uses: technote-space/load-config-action@v1
with:
CONFIG_FILENAME: workflow-settings.json
- uses: technote-space/pr-commit-body-action@v1
with:
EXCLUDE_MESSAGES: |
trigger workflow
update TOC
update package version
update wp version
TITLE: '## Changes'
EXCLUDE_MESSAGES: ${{ env.EXCLUDE_MESSAGES }}
TITLE: ${{ env.PR_BODY_TITLE }}
LINK_ISSUE_KEYWORD: ${{ (startsWith(github.head_ref, 'release/') && 'closes') || '' }}
FILTER_PR: true

Expand All @@ -33,18 +32,22 @@ jobs:
runs-on: ubuntu-latest
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')"
steps:
- uses: technote-space/load-config-action@v1
with:
CONFIG_FILENAME: workflow-settings.json
- uses: technote-space/release-type-action@v1
with:
EXCLUDE_MESSAGES: ${{ env.EXCLUDE_MESSAGES }}
GITHUB_TOKEN: ${{ secrets.ACCESS_TOKEN }}
EXCLUDE_MESSAGES: |
update package version
update packages

checkVersion:
name: Check package version
runs-on: ubuntu-latest
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')"
steps:
- uses: technote-space/load-config-action@v1
with:
CONFIG_FILENAME: workflow-settings.json
- name: Set running flag
run: echo "::set-env name=RUNNING::1"
- uses: actions/checkout@v2
Expand All @@ -57,9 +60,7 @@ jobs:
- name: Get version
uses: technote-space/get-next-version-action@v1
with:
EXCLUDE_MESSAGES: |
update package version
update packages
EXCLUDE_MESSAGES: ${{ env.EXCLUDE_MESSAGES }}
if: env.RUNNING
- name: Check package version
uses: technote-space/package-version-check-action@v1
Expand Down
11 changes: 7 additions & 4 deletions .github/workflows/toc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,13 @@ jobs:
name: TOC Generator
runs-on: ubuntu-latest
steps:
- uses: technote-space/load-config-action@v1
with:
CONFIG_FILENAME: workflow-settings.json
- uses: technote-space/toc-generator@v2
with:
GITHUB_TOKEN: ${{ secrets.ACCESS_TOKEN }}
TARGET_BRANCH_PREFIX: release/
FOLDING: true
MAX_HEADER_LEVEL: 3
TOC_TITLE: Details
TARGET_BRANCH_PREFIX: ${{ env.BRANCH_PREFIX }}
FOLDING: ${{ env.TOC_FOLDING }}
MAX_HEADER_LEVEL: ${{ env.TOC_MAX_HEADER_LEVEL }}
TOC_TITLE: ${{ env.TOC_TITLE }}
11 changes: 5 additions & 6 deletions .github/workflows/update-dependencies.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,15 @@ jobs:
name: Update npm dependencies
runs-on: ubuntu-latest
steps:
- uses: technote-space/load-config-action@v1
with:
CONFIG_FILENAME: workflow-settings.json
- uses: technote-space/auto-cancel-redundant-job@v1
with:
EXCLUDE_MERGED: 'true'
- name: Update dependencies
id: update_deps
uses: technote-space/create-pr-action@v1
uses: technote-space/create-pr-action@v2
with:
GITHUB_TOKEN: ${{ secrets.ACCESS_TOKEN }}
EXECUTE_COMMANDS: |
Expand All @@ -26,8 +29,6 @@ jobs:
yarn upgrade
yarn audit
COMMIT_MESSAGE: 'chore: update npm dependencies'
PR_BRANCH_NAME: 'chore-npm-update-${PR_ID}'
PR_TITLE: 'chore: update npm dependencies (${PR_MERGE_REF})'
PR_DEFAULT_BRANCH_PREFIX: release/
PR_DEFAULT_BRANCH_NAME: next-${CURRENT_VERSION}
PR_DEFAULT_BRANCH_TITLE: 'feat: release'
Expand All @@ -49,9 +50,7 @@ jobs:
- name: Get version
uses: technote-space/get-next-version-action@v1
with:
EXCLUDE_MESSAGES: |
update package version
update packages
EXCLUDE_MESSAGES: ${{ env.EXCLUDE_MESSAGES }}
if: "env.RUNNING && ! startsWith(github.head_ref, 'release/v')"
- name: Get version
run: echo "::set-env name=NEXT_VERSION::${HEAD_REF#release/}"
Expand Down