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

Commit 2974757

Browse files
Merge pull request #320 from technote-space/chore/chore-sync-workflows
chore: sync workflows
2 parents 0497921 + 82a9d94 commit 2974757

File tree

5 files changed

+55
-17
lines changed

5 files changed

+55
-17
lines changed

.github/gh-pages.json

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
{
2+
"GH_PAGES_APP_ID": "editor",
3+
"GH_PAGES_PLUGIN_SCRIPT": "./index.min.js",
4+
"GH_PAGES_PLUGIN_STYLE": "./index.css",
5+
"GH_PAGES_TITLE": "Marker Animation",
6+
"GH_PAGES_TEMPLATE": "gutenberg",
7+
"GH_PAGES_TRACKING_ID": "UA-78163306-3"
8+
}
Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
on:
22
pull_request:
3-
types: [opened]
3+
types: [synchronize]
44

55
name: Check version
66

@@ -10,20 +10,27 @@ jobs:
1010
runs-on: ubuntu-latest
1111
if: startsWith(github.head_ref, 'release/')
1212
steps:
13+
- uses: technote-space/load-config-action@v1
14+
with:
15+
CONFIG_FILENAME: workflow-settings.json
1316
- name: Set running flag
1417
run: echo "::set-env name=RUNNING::1"
1518
- uses: actions/checkout@v2
16-
- uses: technote-space/get-git-comment-action@v1
1719
- name: Set running flag
1820
run: |
1921
if [[ ! -f readme.txt ]]; then
2022
echo "::set-env name=RUNNING::"
2123
fi
2224
23-
- name: Check version
25+
- name: Get version
26+
uses: technote-space/get-next-version-action@v1
27+
with:
28+
EXCLUDE_MESSAGES: ${{ env.EXCLUDE_MESSAGES }}
29+
if: env.RUNNING
30+
- name: Check package version
2431
uses: technote-space/wp-version-check-action@v1
2532
with:
2633
GITHUB_TOKEN: ${{ secrets.ACCESS_TOKEN }}
2734
BRANCH_PREFIX: release/
28-
IGNORE_CONTEXT_CHECK: true
29-
if: env.RUNNING
35+
NEXT_VERSION: ${{ env.NEXT_VERSION }}
36+
if: env.NEXT_VERSION

.github/workflows/ci.yml

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -281,6 +281,8 @@ jobs:
281281
WP_MULTISITE: ${{ matrix.WP_MULTISITE }}
282282
ACTIVATE_POPULAR_PLUGINS: ${{ matrix.ACTIVATE_POPULAR_PLUGINS }}
283283
if: env.RUNNING
284+
- run: sudo systemctl start mysql
285+
if: env.RUNNING
284286
- name: Run tests
285287
run: bash travis-ci/bin/php/wp-test.sh
286288
env:
@@ -316,6 +318,9 @@ jobs:
316318
echo "::set-env name=RUNNING::"
317319
fi
318320
321+
- uses: technote-space/load-config-action@v1
322+
with:
323+
CONFIG_FILENAME: gh-pages.json
319324
- name: Get Yarn Cache Directory
320325
id: yarn-cache
321326
run: echo "::set-output name=dir::$(yarn cache dir)"
@@ -334,12 +339,6 @@ jobs:
334339
bash travis-ci/bin/deploy/gh-pages.sh
335340
env:
336341
TRAVIS_BUILD_DIR: ${{ github.workspace }}
337-
GH_PAGES_APP_ID: editor
338-
GH_PAGES_PLUGIN_SCRIPT: ./index.min.js
339-
GH_PAGES_PLUGIN_STYLE: ./index.css
340-
GH_PAGES_TITLE: Marker Animation
341-
GH_PAGES_TEMPLATE: gutenberg
342-
GH_PAGES_TRACKING_ID: UA-78163306-3
343342
if: env.RUNNING
344343
- name: Deploy
345344
uses: JamesIves/github-pages-deploy-action@releases/v3

.github/workflows/sync-workflows.yml

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ jobs:
1111
runs-on: ubuntu-latest
1212
steps:
1313
- name: Sync workflows
14-
uses: technote-space/create-pr-action@v1
14+
uses: technote-space/create-pr-action@v2
1515
with:
1616
GITHUB_TOKEN: ${{ secrets.ACCESS_TOKEN }}
1717
EXECUTE_COMMANDS: |
@@ -20,11 +20,6 @@ jobs:
2020
git clone --depth=1 https://github.com/technote-space/github-actions-workflows.git .github/workflows/.tmp/workflows
2121
2222
bash .github/workflows/.tmp/workflows/wp-plugin/copy.sh
23-
sed -i "s/WP_VERSION: \[.\+$/WP_VERSION: ['latest', '4.6']/" .github/workflows/ci.yml
24-
sed -i "/ACTIVATE_POPULAR_PLUGINS: 1/a \ exclude:\n - php: '7.3'\n WP_VERSION: '4.6'" .github/workflows/ci.yml
25-
sed -i "s/GH_PAGES_APP_ID:.*$/GH_PAGES_APP_ID: editor/" .github/workflows/ci.yml
26-
sed -i "s/GH_PAGES_PLUGIN_STYLE:.*$/GH_PAGES_PLUGIN_STYLE: .\/index.css/" .github/workflows/ci.yml
27-
sed -i "s/GH_PAGES_TITLE:.*$/GH_PAGES_TITLE: Marker Animation/" .github/workflows/ci.yml
2823
2924
rm -rdf .github/workflows/.tmp
3025
COMMIT_MESSAGE: 'chore: sync workflows'

.github/workflows/update-dependencies.yml

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,14 @@ jobs:
1818
name: Update dependencies
1919
runs-on: ubuntu-latest
2020
steps:
21+
- uses: technote-space/load-config-action@v1
22+
with:
23+
CONFIG_FILENAME: workflow-settings.json
2124
- uses: technote-space/auto-cancel-redundant-job@v1
2225
with:
2326
EXCLUDE_MERGED: 'true'
2427
- name: Update dependencies
28+
id: update_deps
2529
uses: technote-space/create-pr-action@v2
2630
with:
2731
GITHUB_TOKEN: ${{ secrets.ACCESS_TOKEN }}
@@ -34,3 +38,28 @@ jobs:
3438
PR_DEFAULT_BRANCH_TITLE: 'feat: release'
3539
TARGET_BRANCH_PREFIX: release/
3640
AUTO_MERGE_THRESHOLD_DAYS: 14
41+
42+
- name: Set running flag
43+
run: echo "::set-env name=RUNNING::"
44+
- name: Set running flag
45+
run: echo "::set-env name=RUNNING::1"
46+
if: steps.update_deps.outputs.result != 'succeeded' && github.event_name == 'pull_request' && github.event.action != 'closed' && github.event.pull_request.head.user.id == github.event.pull_request.base.user.id && startsWith(github.head_ref, 'release/')
47+
- uses: actions/checkout@v2
48+
if: env.RUNNING
49+
- name: Set running flag
50+
run: |
51+
if [[ ! -f readme.txt ]]; then
52+
echo "::set-env name=RUNNING::"
53+
fi
54+
- name: Get version
55+
uses: technote-space/get-next-version-action@v1
56+
with:
57+
EXCLUDE_MESSAGES: ${{ env.EXCLUDE_MESSAGES }}
58+
if: env.RUNNING
59+
- name: Check package version
60+
uses: technote-space/wp-version-check-action@v1
61+
with:
62+
GITHUB_TOKEN: ${{ secrets.ACCESS_TOKEN }}
63+
BRANCH_PREFIX: release/
64+
NEXT_VERSION: ${{ env.NEXT_VERSION }}
65+
if: env.NEXT_VERSION

0 commit comments

Comments
 (0)