Skip to content
This repository has been archived by the owner on Nov 24, 2023. It is now read-only.

chore: sync workflows #69

Merged
merged 2 commits into from
Mar 21, 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
7 changes: 4 additions & 3 deletions .github/workflows/add-test-tag.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,15 @@ 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/')
steps:
- uses: technote-space/load-config-action@v1
with:
CONFIG_FILENAME: workflow-settings.json
- uses: actions/checkout@v2
- uses: technote-space/get-git-comment-action@v1
- 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') && (contains(env.COMMIT_MESSAGE, 'chore: update dependencies') || contains(env.COMMIT_MESSAGE, 'chore: update npm dependencies'))"
- name: Get version
run: echo "::set-env name=NEXT_VERSION::${HEAD_REF#release/}"
Expand Down
8 changes: 4 additions & 4 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 @@ -144,7 +144,7 @@ jobs:
${{ runner.os }}-yarn-

- name: Release GitHub Actions
uses: technote-space/release-github-actions@v4
uses: technote-space/release-github-actions@v5
with:
BRANCH_NAME: 'releases/${MAJOR}, gh-actions'
OUTPUT_BUILD_INFO_FILENAME: build.json
Expand Down Expand Up @@ -259,7 +259,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 @@ -274,4 +274,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 }}
7 changes: 4 additions & 3 deletions .github/workflows/update-dependencies.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@ 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'
Expand Down Expand Up @@ -49,9 +52,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