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

Commit f8d4ff1

Browse files
chore: sync workflows
1 parent d510959 commit f8d4ff1

File tree

5 files changed

+65
-11
lines changed

5 files changed

+65
-11
lines changed
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/github-script@0.4.0
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 8 * *
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: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,9 @@ jobs:
1313
env:
1414
LINT: 1
1515
steps:
16+
- uses: technote-space/auto-cancel-redundant-job@v1
17+
with:
18+
EXCLUDE_MERGED: 'true'
1619
- name: Set running flag
1720
run: echo "::set-env name=RUNNING::1"
1821
- uses: actions/checkout@v2
@@ -254,9 +257,10 @@ jobs:
254257
fi
255258
256259
- name: Switch PHP version
257-
env:
258-
PHP_VERSION: ${{ matrix.php }}
259-
run: sudo ln -sf "/usr/bin/php$PHP_VERSION" /etc/alternatives/php
260+
uses: shivammathur/setup-php@v2
261+
with:
262+
php-version: ${{ matrix.php }}
263+
coverage: xdebug
260264
if: env.RUNNING
261265
- name: Get Composer Cache Directory
262266
id: composer-cache
@@ -353,9 +357,10 @@ jobs:
353357
steps:
354358
- uses: actions/checkout@v2
355359
- name: Switch PHP version
356-
env:
357-
PHP_VERSION: '5.6'
358-
run: sudo ln -sf "/usr/bin/php$PHP_VERSION" /etc/alternatives/php
360+
uses: shivammathur/setup-php@v2
361+
with:
362+
php-version: '5.6'
363+
coverage: xdebug
359364
- name: Get Composer Cache Directory
360365
id: composer-cache
361366
run: |

.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
@@ -18,6 +18,9 @@ jobs:
1818
name: Update dependencies
1919
runs-on: ubuntu-latest
2020
steps:
21+
- uses: technote-space/auto-cancel-redundant-job@v1
22+
with:
23+
EXCLUDE_MERGED: 'true'
2124
- name: Update dependencies
2225
uses: technote-space/create-pr-action@v1
2326
with:

0 commit comments

Comments
 (0)