From 8ba45c19795726d82a315eb514419e798ceaaca1 Mon Sep 17 00:00:00 2001 From: technote-space Date: Thu, 9 Apr 2020 11:03:16 +0000 Subject: [PATCH 1/2] chore: sync workflows --- .github/workflows/add-release-tag.yml | 2 ++ .github/workflows/broken-link-check.yml | 3 ++- .github/workflows/ci.yml | 6 ++++++ .github/workflows/issue-opened.yml | 2 ++ .github/workflows/pr-opened.yml | 3 +++ .github/workflows/pr-updated.yml | 14 ++++++++++++-- .github/workflows/project-card-moved.yml | 1 + .github/workflows/toc.yml | 1 + .github/workflows/update-dependencies.yml | 1 + 9 files changed, 30 insertions(+), 3 deletions(-) diff --git a/.github/workflows/add-release-tag.yml b/.github/workflows/add-release-tag.yml index 60e9f8f..f420814 100644 --- a/.github/workflows/add-release-tag.yml +++ b/.github/workflows/add-release-tag.yml @@ -2,6 +2,7 @@ on: pull_request: branches: - master + - develop/v* types: [closed] name: Add release tag @@ -10,6 +11,7 @@ jobs: tag: name: Add release tag runs-on: ubuntu-latest + timeout-minutes: 3 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/') steps: - uses: technote-space/load-config-action@v1 diff --git a/.github/workflows/broken-link-check.yml b/.github/workflows/broken-link-check.yml index cd1356d..3541874 100644 --- a/.github/workflows/broken-link-check.yml +++ b/.github/workflows/broken-link-check.yml @@ -1,6 +1,6 @@ on: schedule: - - cron: 0 0 2 * * + - cron: 0 0 5 * * repository_dispatch: types: [check-link] @@ -9,6 +9,7 @@ jobs: check: name: Broken Link Check runs-on: ubuntu-latest + timeout-minutes: 10 steps: - uses: technote-space/auto-cancel-redundant-job@v1 with: diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index be94d6c..d10e4a5 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -11,6 +11,7 @@ jobs: phpcs: name: PHP Code Sniffer runs-on: ubuntu-latest + timeout-minutes: 5 env: LINT: 1 steps: @@ -52,6 +53,7 @@ jobs: phpmd: name: PHPMD runs-on: ubuntu-latest + timeout-minutes: 5 env: LINT: 1 steps: @@ -92,6 +94,7 @@ jobs: name: PHPUnit needs: [phpcs, phpmd] runs-on: ubuntu-latest + timeout-minutes: 5 strategy: matrix: php: ['7.3', '7.4'] @@ -166,6 +169,7 @@ jobs: name: Publish GitHub Pages needs: phpunit runs-on: ubuntu-latest + timeout-minutes: 10 if: startsWith(github.ref, 'refs/tags/') env: GH_PAGES_DIR: public/gh-pages @@ -211,6 +215,7 @@ jobs: name: Create Release needs: [pages] runs-on: ubuntu-latest + timeout-minutes: 5 steps: - name: Get version run: echo "::set-env name=TAG_NAME::${HEAD_REF#refs/tags/}" @@ -237,6 +242,7 @@ jobs: name: Slack needs: publishRelease runs-on: ubuntu-latest + timeout-minutes: 3 if: always() steps: - uses: technote-space/workflow-conclusion-action@v1 diff --git a/.github/workflows/issue-opened.yml b/.github/workflows/issue-opened.yml index 6661eb2..0066fe5 100644 --- a/.github/workflows/issue-opened.yml +++ b/.github/workflows/issue-opened.yml @@ -8,6 +8,7 @@ jobs: assign: name: Assign issues to project runs-on: ubuntu-latest + timeout-minutes: 3 steps: - uses: technote-space/load-config-action@v1 with: @@ -20,5 +21,6 @@ jobs: assignAuthor: name: Assign author to issue runs-on: ubuntu-latest + timeout-minutes: 3 steps: - uses: technote-space/assign-author@v1 diff --git a/.github/workflows/pr-opened.yml b/.github/workflows/pr-opened.yml index 17d2173..5553e8d 100644 --- a/.github/workflows/pr-opened.yml +++ b/.github/workflows/pr-opened.yml @@ -9,6 +9,7 @@ jobs: if: github.event.pull_request.head.user.id == github.event.pull_request.base.user.id name: Assign PullRequest to Project runs-on: ubuntu-latest + timeout-minutes: 3 steps: - uses: technote-space/load-config-action@v1 with: @@ -22,11 +23,13 @@ jobs: assignAuthor: name: Assign author to PR runs-on: ubuntu-latest + timeout-minutes: 3 steps: - uses: technote-space/assign-author@v1 addLabelsByBranch: name: PR Labeler runs-on: ubuntu-latest + timeout-minutes: 3 steps: - uses: technote-space/pr-labeler-action@v4 diff --git a/.github/workflows/pr-updated.yml b/.github/workflows/pr-updated.yml index a30b14f..e1eb49b 100644 --- a/.github/workflows/pr-updated.yml +++ b/.github/workflows/pr-updated.yml @@ -6,6 +6,7 @@ jobs: triage: name: Pull Request Labeler runs-on: ubuntu-latest + timeout-minutes: 3 if: "! startsWith(github.head_ref, 'release/')" steps: - uses: actions/labeler@v2 @@ -15,6 +16,7 @@ jobs: history: name: Pull Request Body runs-on: ubuntu-latest + timeout-minutes: 3 if: github.event.pull_request.head.user.id == github.event.pull_request.base.user.id steps: - uses: technote-space/load-config-action@v1 @@ -30,6 +32,7 @@ jobs: manageRelease: name: Manage release runs-on: ubuntu-latest + timeout-minutes: 3 if: "github.event.pull_request.head.user.id == github.event.pull_request.base.user.id && startsWith(github.head_ref, 'release/') && ! startsWith(github.head_ref, 'release/v')" steps: - uses: technote-space/load-config-action@v1 @@ -43,7 +46,8 @@ jobs: checkVersion: name: Check package version runs-on: ubuntu-latest - if: "github.event.action == 'synchronize' && github.event.pull_request.head.user.id == github.event.pull_request.base.user.id && startsWith(github.head_ref, 'release/') && ! startsWith(github.head_ref, 'release/v')" + timeout-minutes: 3 + if: "github.event.action == 'synchronize' && github.event.pull_request.head.user.id == github.event.pull_request.base.user.id && startsWith(github.head_ref, 'release/')" steps: - uses: technote-space/load-config-action@v1 with: @@ -61,7 +65,12 @@ jobs: uses: technote-space/get-next-version-action@v1 with: EXCLUDE_MESSAGES: ${{ env.EXCLUDE_MESSAGES }} - if: env.RUNNING + if: "env.RUNNING && ! startsWith(github.head_ref, 'release/v')" + - name: Get version + run: echo "::set-env name=NEXT_VERSION::${HEAD_REF#release/}" + env: + HEAD_REF: ${{ github.head_ref }} + if: env.RUNNING && startsWith(github.head_ref, 'release/v') - name: Check package version uses: technote-space/package-version-check-action@v1 with: @@ -73,6 +82,7 @@ jobs: checkPublish: name: Check publish runs-on: ubuntu-latest + timeout-minutes: 3 if: "github.event.pull_request.head.user.id == github.event.pull_request.base.user.id && startsWith(github.head_ref, 'release/')" steps: - name: Set running flag diff --git a/.github/workflows/project-card-moved.yml b/.github/workflows/project-card-moved.yml index e0aad2d..a7fd02a 100644 --- a/.github/workflows/project-card-moved.yml +++ b/.github/workflows/project-card-moved.yml @@ -8,5 +8,6 @@ jobs: triage: name: Auto card labeler runs-on: ubuntu-latest + timeout-minutes: 3 steps: - uses: technote-space/auto-card-labeler@v1 diff --git a/.github/workflows/toc.yml b/.github/workflows/toc.yml index d273ee3..27f0afa 100644 --- a/.github/workflows/toc.yml +++ b/.github/workflows/toc.yml @@ -9,6 +9,7 @@ jobs: if: github.event.pull_request.head.user.id == github.event.pull_request.base.user.id name: TOC Generator runs-on: ubuntu-latest + timeout-minutes: 3 steps: - uses: technote-space/load-config-action@v1 with: diff --git a/.github/workflows/update-dependencies.yml b/.github/workflows/update-dependencies.yml index 2d2a371..8f6929e 100644 --- a/.github/workflows/update-dependencies.yml +++ b/.github/workflows/update-dependencies.yml @@ -17,6 +17,7 @@ jobs: update: name: Update dependencies runs-on: ubuntu-latest + timeout-minutes: 10 steps: - uses: technote-space/auto-cancel-redundant-job@v1 with: From 8a72df864a5ac53237d0784ed43026ccf6f55320 Mon Sep 17 00:00:00 2001 From: Technote Date: Fri, 10 Apr 2020 23:14:59 +0900 Subject: [PATCH 2/2] Update sync-workflows.yml --- .github/workflows/sync-workflows.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/sync-workflows.yml b/.github/workflows/sync-workflows.yml index d372026..9ec96c0 100644 --- a/.github/workflows/sync-workflows.yml +++ b/.github/workflows/sync-workflows.yml @@ -9,9 +9,10 @@ jobs: release: name: Sync workflows runs-on: ubuntu-latest + timeout-minutes: 5 steps: - name: Sync workflows - uses: technote-space/create-pr-action@v1 + uses: technote-space/create-pr-action@v2 with: GITHUB_TOKEN: ${{ secrets.ACCESS_TOKEN }} EXECUTE_COMMANDS: |