Skip to content

Commit 42a2d22

Browse files
Merge pull request #56 from technote-space/chore/chore-sync-workflows
chore: sync workflows
2 parents 0daee06 + 5bbda62 commit 42a2d22

File tree

5 files changed

+57
-5
lines changed

5 files changed

+57
-5
lines changed

.github/workflows/add-version-tag.yml renamed to .github/workflows/add-release-tag.yml

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,11 @@ on:
44
- master
55
types: [closed]
66

7-
name: Add version tag
7+
name: Add release tag
88

99
jobs:
1010
tag:
11-
name: Add version tag
11+
name: Add release tag
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:
@@ -35,3 +35,14 @@ jobs:
3535
sha: context.sha
3636
})
3737
if: env.NEXT_VERSION
38+
- uses: actions/[email protected]
39+
with:
40+
github-token: ${{ secrets.ACCESS_TOKEN }}
41+
script: |
42+
github.git.createRef({
43+
owner: context.repo.owner,
44+
repo: context.repo.repo,
45+
ref: `refs/heads/release/next-${process.env.NEXT_VERSION}`,
46+
sha: context.sha
47+
})
48+
if: env.NEXT_VERSION
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
on:
2+
schedule:
3+
- cron: 0 0 6 * *
4+
repository_dispatch:
5+
types: [check-link]
6+
7+
name: Broken Link Check
8+
jobs:
9+
check:
10+
name: Broken Link Check
11+
runs-on: ubuntu-latest
12+
steps:
13+
- uses: technote-space/auto-cancel-redundant-job@v1
14+
with:
15+
EXCLUDE_MERGED: 'true'
16+
- name: Broken Link Check
17+
uses: technote-space/broken-link-checker-action@v1

.github/workflows/ci.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,9 @@ jobs:
99
env:
1010
LINT: 1
1111
steps:
12+
- uses: technote-space/auto-cancel-redundant-job@v1
13+
with:
14+
EXCLUDE_MERGED: 'true'
1215
- name: Set running flag
1316
run: echo "::set-env name=RUNNING::1"
1417
- uses: actions/checkout@v2

.github/workflows/pr-updated.yml

Lines changed: 21 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
1-
on:
2-
pull_request:
3-
types: [opened, synchronize]
1+
on: pull_request
42

53
name: Pull Request updated
64

@@ -70,3 +68,23 @@ jobs:
7068
BRANCH_PREFIX: release/
7169
NEXT_VERSION: ${{ env.NEXT_VERSION }}
7270
if: env.NEXT_VERSION
71+
72+
checkPublish:
73+
name: Check publish
74+
runs-on: ubuntu-latest
75+
if: "github.event.pull_request.head.user.id == github.event.pull_request.base.user.id && startsWith(github.head_ref, 'release/')"
76+
steps:
77+
- name: Set running flag
78+
run: echo "::set-env name=RUNNING::1"
79+
- name: Set running flag
80+
run: |
81+
if [ -z "$NPM_AUTH_TOKEN" ]; then
82+
echo "::set-env name=RUNNING::"
83+
fi
84+
env:
85+
NPM_AUTH_TOKEN: ${{ secrets.NPM_AUTH_TOKEN }}
86+
87+
- uses: actions/checkout@v2
88+
if: env.RUNNING
89+
- uses: technote-space/can-npm-publish-action@v1
90+
if: env.RUNNING

.github/workflows/update-dependencies.yml

Lines changed: 3 additions & 0 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/auto-cancel-redundant-job@v1
16+
with:
17+
EXCLUDE_MERGED: 'true'
1518
- name: Update dependencies
1619
id: update_deps
1720
uses: technote-space/create-pr-action@v1

0 commit comments

Comments
 (0)