Skip to content
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
16 changes: 0 additions & 16 deletions .github/workflows/check-version.yml

This file was deleted.

21 changes: 21 additions & 0 deletions .github/workflows/pr-opened.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,3 +33,24 @@ jobs:
uses: technote-space/pr-labeler-action@v3
with:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

checkVersion:
name: Check package version
runs-on: ubuntu-latest
if: startsWith(github.event.pull_request.head.ref, 'release/')
steps:
- name: Set running flag
run: echo "::set-env name=RUNNING::1"
- uses: actions/checkout@v2
- name: Set running flag
run: |
if [[ ! -f package.json ]] || [[ $(< package.json jq -r '.version == null') == 'true' ]]; then
echo "::set-env name=RUNNING::"
fi

- name: Check package version
uses: technote-space/package-version-check-action@v1
with:
GITHUB_TOKEN: ${{ secrets.ACCESS_TOKEN }}
BRANCH_PREFIX: release/
if: env.RUNNING
33 changes: 32 additions & 1 deletion .github/workflows/pr-updated.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
on: pull_request
on:
pull_request:
types: [opened, synchronize]

name: Pull Request updated

Expand All @@ -16,6 +18,7 @@ jobs:
assignToProject:
name: Assign PullRequest to Project
runs-on: ubuntu-latest
if: github.event.action == 'synchronize'
steps:
- uses: actions/checkout@v2
- uses: technote-space/get-git-comment-action@v1
Expand All @@ -31,6 +34,7 @@ jobs:
assignAuthor:
name: Assign author to PR
runs-on: ubuntu-latest
if: github.event.action == 'synchronize'
steps:
- uses: actions/checkout@v2
- uses: technote-space/get-git-comment-action@v1
Expand All @@ -44,6 +48,7 @@ jobs:
addLabelsByBranch:
name: PR Labeler
runs-on: ubuntu-latest
if: github.event.action == 'synchronize'
steps:
- uses: actions/checkout@v2
- uses: technote-space/get-git-comment-action@v1
Expand All @@ -53,3 +58,29 @@ jobs:
with:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
IGNORE_CONTEXT_CHECK: true

checkVersion:
name: Check package version
runs-on: ubuntu-latest
if: github.event.action == 'synchronize' && startsWith(github.event.pull_request.head.ref, 'release/')
steps:
- name: Set running flag
run: echo "::set-env name=RUNNING::"
- uses: actions/checkout@v2
- uses: technote-space/get-git-comment-action@v1
- name: Set running flag
run: echo "::set-env name=RUNNING::1"
if: contains(env.COMMIT_MESSAGE, 'trigger workflow')
- name: Set running flag
run: |
if [[ ! -f package.json ]] || [[ $(< package.json jq -r '.version == null') == 'true' ]]; then
echo "::set-env name=RUNNING::"
fi

- name: Check package version
uses: technote-space/package-version-check-action@v1
with:
GITHUB_TOKEN: ${{ secrets.ACCESS_TOKEN }}
BRANCH_PREFIX: release/
IGNORE_CONTEXT_CHECK: true
if: env.RUNNING