From eb5bdb1bd097ec212ad5f8e7d2850588c2c88041 Mon Sep 17 00:00:00 2001 From: technote-space Date: Thu, 6 Feb 2020 14:22:13 +0000 Subject: [PATCH 1/2] chore: sync workflows --- .github/workflows/check_version.yml | 2 -- .github/workflows/ci.yml | 10 +++--- .github/workflows/pr_updated.yml | 42 +++++++++++++++++++++++ .github/workflows/release.yml | 4 --- .github/workflows/toc.yml | 4 +++ .github/workflows/update-dependencies.yml | 3 +- 6 files changed, 54 insertions(+), 11 deletions(-) diff --git a/.github/workflows/check_version.yml b/.github/workflows/check_version.yml index 04d85faa..37234090 100644 --- a/.github/workflows/check_version.yml +++ b/.github/workflows/check_version.yml @@ -6,8 +6,6 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 - with: - fetch-depth: 3 - name: Check package version uses: technote-space/package-version-check-action@v1 with: diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 4dba6d18..62dbaef6 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -12,10 +12,11 @@ jobs: eslint: name: ESLint runs-on: ubuntu-latest + env: + LINT: 1 steps: - uses: actions/checkout@v2 - with: - fetch-depth: 3 + - uses: technote-space/get-git-comment-action@v1 - uses: technote-space/get-diff-action@v1 with: PREFIX_FILTER: | @@ -23,6 +24,7 @@ jobs: __tests__/ SUFFIX_FILTER: .ts FILES: .eslintrc + if: "! contains(env.COMMIT_MESSAGE, '[skip ci]') && ! contains(env.COMMIT_MESSAGE, '[ci skip]')" - name: Get Yarn Cache Directory id: yarn-cache run: echo "::set-output name=dir::$(yarn cache dir)" @@ -58,8 +60,7 @@ jobs: node: ['10', '11', '12'] steps: - uses: actions/checkout@v2 - with: - fetch-depth: 3 + - uses: technote-space/get-git-comment-action@v1 - uses: technote-space/get-diff-action@v1 with: PREFIX_FILTER: | @@ -71,6 +72,7 @@ jobs: FILES: | yarn.lock jest.config.js + if: "! contains(env.COMMIT_MESSAGE, '[skip ci]') && ! contains(env.COMMIT_MESSAGE, '[ci skip]')" - name: Setup node uses: actions/setup-node@v1 with: diff --git a/.github/workflows/pr_updated.yml b/.github/workflows/pr_updated.yml index 14c57437..39e24285 100644 --- a/.github/workflows/pr_updated.yml +++ b/.github/workflows/pr_updated.yml @@ -9,3 +9,45 @@ jobs: uses: actions/labeler@v2 with: repo-token: ${{ secrets.GITHUB_TOKEN }} + + assignToProject: + name: Assign PullRequest to Project + runs-on: ubuntu-latest + 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 + 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 + 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 + diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 3a9edacf..b999da59 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -12,8 +12,6 @@ jobs: steps: - name: Checkout uses: actions/checkout@v2 - with: - fetch-depth: 3 - name: Get Yarn Cache Directory id: yarn-cache run: echo "::set-output name=dir::$(yarn cache dir)" @@ -46,8 +44,6 @@ jobs: steps: - name: Checkout uses: actions/checkout@v2 - with: - fetch-depth: 3 - name: Setup Node.js uses: actions/setup-node@v1 with: diff --git a/.github/workflows/toc.yml b/.github/workflows/toc.yml index 2d4aded7..825d767a 100644 --- a/.github/workflows/toc.yml +++ b/.github/workflows/toc.yml @@ -13,4 +13,8 @@ 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 + TOC_TITLE: Details diff --git a/.github/workflows/update-dependencies.yml b/.github/workflows/update-dependencies.yml index 20742726..549d696b 100644 --- a/.github/workflows/update-dependencies.yml +++ b/.github/workflows/update-dependencies.yml @@ -2,7 +2,7 @@ on: schedule: - cron: 0 9 * * 2,5 pull_request: - types: [opened, synchronize, reopened, closed] + types: [opened, reopened, closed] repository_dispatch: types: [update-deps] @@ -16,6 +16,7 @@ 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 8b59bd65bbb9b8b5cc3b0e4a27ab6596d0f5c434 Mon Sep 17 00:00:00 2001 From: technote-space Date: Thu, 6 Feb 2020 14:22:17 +0000 Subject: [PATCH 2/2] chore: trigger workflow