From c63b182ec8d94b7fb1fe055efd609f430c3e7292 Mon Sep 17 00:00:00 2001 From: technote-space Date: Tue, 25 Feb 2020 05:01:21 +0000 Subject: [PATCH 1/3] chore: sync workflows --- .github/workflows/ci.yml | 3 + .github/workflows/pr-updated.yml | 74 +---------------------- .github/workflows/toc.yml | 1 - .github/workflows/update-dependencies.yml | 1 - 4 files changed, 6 insertions(+), 73 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 5beb3e8..91a7937 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -82,6 +82,9 @@ jobs: - name: Set running flag if: matrix.node == '12' && github.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') + run: echo "::set-env name=RUNNING::1" - name: Set running flag run: | if [[ ! -f package.json ]] || ! < package.json jq -r '.scripts | keys[]' | grep -qe '^cover$'; then diff --git a/.github/workflows/pr-updated.yml b/.github/workflows/pr-updated.yml index faf19f3..4a64ec4 100644 --- a/.github/workflows/pr-updated.yml +++ b/.github/workflows/pr-updated.yml @@ -18,7 +18,7 @@ jobs: history: name: Pull Request Body runs-on: ubuntu-latest - if: startsWith(github.event.pull_request.head.ref, 'release/') + if: startsWith(github.event.pull_request.head.ref, 'release/') || github.event.pull_request.head.user.id == github.event.pull_request.base.user.id steps: - name: Pull Request Body uses: technote-space/pr-commit-body-action@v1 @@ -29,73 +29,5 @@ jobs: Update TOC Update package version TITLE: '## Changes' - - 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 - - name: Assign PullRequest to Project - if: contains(env.COMMIT_MESSAGE, 'trigger workflow') - uses: technote-space/create-project-card-action@v1 - with: - PROJECT: Backlog - COLUMN: To do - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - IGNORE_CONTEXT_CHECK: true - - 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 - - name: Assign Author to PR - if: contains(env.COMMIT_MESSAGE, 'trigger workflow') - uses: technote-space/assign-author@v1 - with: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - IGNORE_CONTEXT_CHECK: true - - 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 - - name: PR Labeler - if: contains(env.COMMIT_MESSAGE, 'trigger workflow') - uses: technote-space/pr-labeler-action@v3 - 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 + LINK_ISSUE_KEYWORD: ${{ (startsWith(github.event.pull_request.head.ref, 'release/') && 'closes') || '' }} + FILTER_PR: true diff --git a/.github/workflows/toc.yml b/.github/workflows/toc.yml index 825d767..092ff42 100644 --- a/.github/workflows/toc.yml +++ b/.github/workflows/toc.yml @@ -13,7 +13,6 @@ jobs: uses: technote-space/toc-generator@v2 with: GITHUB_TOKEN: ${{ secrets.ACCESS_TOKEN }} - API_TOKEN: ${{ secrets.GITHUB_TOKEN }} TARGET_BRANCH_PREFIX: release/ FOLDING: true MAX_HEADER_LEVEL: 3 diff --git a/.github/workflows/update-dependencies.yml b/.github/workflows/update-dependencies.yml index 14407a1..9581ffc 100644 --- a/.github/workflows/update-dependencies.yml +++ b/.github/workflows/update-dependencies.yml @@ -16,7 +16,6 @@ jobs: uses: technote-space/create-pr-action@v1 with: GITHUB_TOKEN: ${{ secrets.ACCESS_TOKEN }} - API_TOKEN: ${{ secrets.GITHUB_TOKEN }} EXECUTE_COMMANDS: | npx npm-check-updates -u --packageFile package.json yarn install From bb0c8b3880871685511dc48b6e629bd36e44262d Mon Sep 17 00:00:00 2001 From: technote-space Date: Tue, 25 Feb 2020 05:01:26 +0000 Subject: [PATCH 2/3] chore: trigger workflow From 3bdd053c8ea69c88aac28f1e13e4256f8699919f Mon Sep 17 00:00:00 2001 From: Technote Date: Tue, 25 Feb 2020 14:02:35 +0900 Subject: [PATCH 3/3] Update sync-workflows.yml --- .github/workflows/sync-workflows.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/sync-workflows.yml b/.github/workflows/sync-workflows.yml index 9a10708..f110c2b 100644 --- a/.github/workflows/sync-workflows.yml +++ b/.github/workflows/sync-workflows.yml @@ -14,7 +14,6 @@ jobs: uses: technote-space/create-pr-action@gh-actions with: GITHUB_TOKEN: ${{ secrets.ACCESS_TOKEN }} - API_TOKEN: ${{ secrets.GITHUB_TOKEN }} EXECUTE_COMMANDS: | rm -rdf .github/workflows/.tmp mkdir -p .github/workflows/.tmp