From 60496edd3d5293bd0984cc2e92ce9985f6bddef1 Mon Sep 17 00:00:00 2001 From: "yu.otsubo" Date: Sat, 14 Jan 2023 12:23:19 +0900 Subject: [PATCH 01/30] [skip netlify]action lint --- .github/workflows/common-lint.yml | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/.github/workflows/common-lint.yml b/.github/workflows/common-lint.yml index 2750ea1b81..42287de12f 100644 --- a/.github/workflows/common-lint.yml +++ b/.github/workflows/common-lint.yml @@ -43,3 +43,15 @@ jobs: uses: suzuki-shunsuke/github-action-renovate-config-validator@v0.1.2 with: config_file_path: 'renovate.json' + actionlint: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - name: Download actionlint + id: get_actionlint + run: bash <(curl https://raw.githubusercontent.com/rhysd/actionlint/main/scripts/download-actionlint.bash) + shell: bash + + - name: Check workflow files + run: ${{ steps.get_actionlint.outputs.executable }} -color + shell: bash From 43dc22d7eae28ae8d6ed017023d0e1dcc6f5afc1 Mon Sep 17 00:00:00 2001 From: "yu.otsubo" Date: Sat, 14 Jan 2023 13:23:29 +0900 Subject: [PATCH 02/30] [skip netlify]action lint --- .github/workflows/common-lint.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/common-lint.yml b/.github/workflows/common-lint.yml index 42287de12f..fe9af9a46d 100644 --- a/.github/workflows/common-lint.yml +++ b/.github/workflows/common-lint.yml @@ -19,7 +19,7 @@ jobs: scope: '@tubone24' - name: Get yarn cache directory path id: yarn-cache-dir-path - run: echo "dir=$(yarn cache dir)" >> $GITHUB_OUTPUT + run: echo "dir=$(yarn cache dir)" >> "${GITHUB_OUTPUT}" - name: Cache uses: actions/cache@v3 with: From 37ff0eeb1a3e7e32aac038c72d48584a401deec9 Mon Sep 17 00:00:00 2001 From: "yu.otsubo" Date: Sat, 14 Jan 2023 14:16:40 +0900 Subject: [PATCH 03/30] [skip netlify]action lint --- .github/workflows/common-lint.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/common-lint.yml b/.github/workflows/common-lint.yml index fe9af9a46d..ba41baa60a 100644 --- a/.github/workflows/common-lint.yml +++ b/.github/workflows/common-lint.yml @@ -33,6 +33,8 @@ jobs: ${{ runner.os }}-build-${{ env.cache-version }}- - name: yarn install run: yarn install --frozen-lockfile + - name: yarn install + run: echo ${{ steps.yarn-cache-dir-path.outputs.dir }} - name: ⬇️ lint markdown files run: yarn format-md renovate: From 69ec6263831c195fda9f39a861e155319912d979 Mon Sep 17 00:00:00 2001 From: "yu.otsubo" Date: Sat, 14 Jan 2023 14:29:19 +0900 Subject: [PATCH 04/30] [skip netlify]action lint --- .github/workflows/common-lint.yml | 2 -- .github/workflows/deploy.yml | 8 ++++---- .github/workflows/owaspzap.yml | 2 +- .github/workflows/previewDeploy.yml | 16 ++++++++-------- .github/workflows/snyk.yml | 2 +- 5 files changed, 14 insertions(+), 16 deletions(-) diff --git a/.github/workflows/common-lint.yml b/.github/workflows/common-lint.yml index ba41baa60a..fe9af9a46d 100644 --- a/.github/workflows/common-lint.yml +++ b/.github/workflows/common-lint.yml @@ -33,8 +33,6 @@ jobs: ${{ runner.os }}-build-${{ env.cache-version }}- - name: yarn install run: yarn install --frozen-lockfile - - name: yarn install - run: echo ${{ steps.yarn-cache-dir-path.outputs.dir }} - name: ⬇️ lint markdown files run: yarn format-md renovate: diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 0462417f11..f4c16ce2e7 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -27,7 +27,7 @@ jobs: sudo apt-get install fonts-noto - name: Get yarn cache directory path id: yarn-cache-dir-path - run: echo "dir=$(yarn cache dir)" >> $GITHUB_OUTPUT + run: echo "dir=$(yarn cache dir)" >> "${GITHUB_OUTPUT}" - name: Cache uses: actions/cache@v3 with: @@ -132,7 +132,7 @@ jobs: scope: '@tubone24' - name: Get yarn cache directory path id: yarn-cache-dir-path - run: echo "dir=$(yarn cache dir)" >> $GITHUB_OUTPUT + run: echo "dir=$(yarn cache dir)" >> "${GITHUB_OUTPUT}" - name: Cache uses: actions/cache@v3 with: @@ -180,7 +180,7 @@ jobs: scope: '@tubone24' - name: Get yarn cache directory path id: yarn-cache-dir-path - run: echo "dir=$(yarn cache dir)" >> $GITHUB_OUTPUT + run: echo "dir=$(yarn cache dir)" >> "${GITHUB_OUTPUT}" - name: Cache uses: actions/cache@v3 with: @@ -240,7 +240,7 @@ jobs: uses: actions/checkout@v3 - name: Get yarn cache directory path id: yarn-cache-dir-path - run: echo "dir=$(yarn cache dir)" >> $GITHUB_OUTPUT + run: echo "dir=$(yarn cache dir)" >> "${GITHUB_OUTPUT}" - name: Cache uses: actions/cache@v3 with: diff --git a/.github/workflows/owaspzap.yml b/.github/workflows/owaspzap.yml index 56dd3226f8..5f69a37835 100644 --- a/.github/workflows/owaspzap.yml +++ b/.github/workflows/owaspzap.yml @@ -22,7 +22,7 @@ jobs: scope: '@tubone24' - name: Get yarn cache directory path id: yarn-cache-dir-path - run: echo "dir=$(yarn cache dir)" >> $GITHUB_OUTPUT + run: echo "dir=$(yarn cache dir)" >> "${GITHUB_OUTPUT}" - name: Cache uses: actions/cache@v3 with: diff --git a/.github/workflows/previewDeploy.yml b/.github/workflows/previewDeploy.yml index 751a0198ce..6a6867409b 100644 --- a/.github/workflows/previewDeploy.yml +++ b/.github/workflows/previewDeploy.yml @@ -135,7 +135,7 @@ jobs: scope: '@tubone24' - name: Get yarn cache directory path id: yarn-cache-dir-path - run: echo "dir=$(yarn cache dir)" >> $GITHUB_OUTPUT + run: echo "dir=$(yarn cache dir)" >> "${GITHUB_OUTPUT}" - name: Cache uses: actions/cache@v3 with: @@ -181,7 +181,7 @@ jobs: scope: '@tubone24' - name: Get yarn cache directory path id: yarn-cache-dir-path - run: echo "dir=$(yarn cache dir)" >> $GITHUB_OUTPUT + run: echo "dir=$(yarn cache dir)" >> "${GITHUB_OUTPUT}" - name: Cache uses: actions/cache@v3 with: @@ -245,7 +245,7 @@ jobs: if: ${{ !contains(needs.check-skip-flags.outputs.head-commit-message, '[skip netlify]') }} id: get-netlify-draft-url run: | - echo "draftUrl=$(cat cli.txt | sed -r 's/.*Website Draft URL: (.*)\\n\\nIf everything.*/\1/')" >> $GITHUB_OUTPUT + echo "draftUrl=$(cat cli.txt | sed -r 's/.*Website Draft URL: (.*)\\n\\nIf everything.*/\1/')" >> "${GITHUB_OUTPUT}" outputs: draftUrl: ${{ steps.get-netlify-draft-url.outputs.draftUrl }} @@ -265,7 +265,7 @@ jobs: scope: '@tubone24' - name: Get yarn cache directory path id: yarn-cache-dir-path - run: echo "dir=$(yarn cache dir)" >> $GITHUB_OUTPUT + run: echo "dir=$(yarn cache dir)" >> "${GITHUB_OUTPUT}" - name: Cache uses: actions/cache@v3 with: @@ -330,7 +330,7 @@ jobs: scope: '@tubone24' - name: Get yarn cache directory path id: yarn-cache-dir-path - run: echo "dir=$(yarn cache dir)" >> $GITHUB_OUTPUT + run: echo "dir=$(yarn cache dir)" >> "${GITHUB_OUTPUT}" - name: Cache uses: actions/cache@v3 with: @@ -390,7 +390,7 @@ jobs: - uses: actions/checkout@v3 - name: Get yarn cache directory path id: yarn-cache-dir-path - run: echo "dir=$(yarn cache dir)" >> $GITHUB_OUTPUT + run: echo "dir=$(yarn cache dir)" >> "${GITHUB_OUTPUT}" - name: Cache uses: actions/cache@v3 with: @@ -422,7 +422,7 @@ jobs: uses: actions/checkout@v3 - name: Get yarn cache directory path id: yarn-cache-dir-path - run: echo "dir=$(yarn cache dir)" >> $GITHUB_OUTPUT + run: echo "dir=$(yarn cache dir)" >> "${GITHUB_OUTPUT}" - name: Cache uses: actions/cache@v3 with: @@ -539,7 +539,7 @@ jobs: name: screenshot-${{ matrix.os }}-${{ matrix.width }} - name: Get PR Number id: get-pr-num - run: echo "prnum=$(echo $GITHUB_REF | sed -e 's/[^0-9]//g')" >> $GITHUB_OUTPUT + run: echo "prnum=$(echo $GITHUB_REF | sed -e 's/[^0-9]//g')" >> "${GITHUB_OUTPUT}" - name: PR Comments env: FILE_PATH: screenshot-${{ matrix.os }}-${{ matrix.width }}.png diff --git a/.github/workflows/snyk.yml b/.github/workflows/snyk.yml index 1ccd0a2c18..d173a00bd5 100644 --- a/.github/workflows/snyk.yml +++ b/.github/workflows/snyk.yml @@ -27,7 +27,7 @@ jobs: scope: '@tubone24' - name: Get yarn cache directory path id: yarn-cache-dir-path - run: echo "dir=$(yarn cache dir)" >> $GITHUB_OUTPUT + run: echo "dir=$(yarn cache dir)" >> "${GITHUB_OUTPUT}" - name: Cache uses: actions/cache@v3 with: From 2f5f3190af6c6b3a42a5db11a2c0f0a6d8e7a19b Mon Sep 17 00:00:00 2001 From: "yu.otsubo" Date: Sat, 14 Jan 2023 14:31:11 +0900 Subject: [PATCH 05/30] [skip netlify]action lint --- .github/workflows/previewDeploy.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/previewDeploy.yml b/.github/workflows/previewDeploy.yml index 6a6867409b..ccf75bc3b3 100644 --- a/.github/workflows/previewDeploy.yml +++ b/.github/workflows/previewDeploy.yml @@ -20,7 +20,7 @@ jobs: - name: Print head git commit message id: get-head-commit-message run: | - echo "headCommitMsg=$(git show -s --format=%s)" >> $GITHUB_OUTPUT + echo "headCommitMsg=$(git show -s --format=%s)" >> "${GITHUB_OUTPUT}" test: runs-on: ubuntu-latest steps: @@ -41,7 +41,7 @@ jobs: sudo apt-get install fonts-noto - name: Get yarn cache directory path id: yarn-cache-dir-path - run: echo "dir=$(yarn cache dir)" >> $GITHUB_OUTPUT + run: echo "dir=$(yarn cache dir)" >> "${GITHUB_OUTPUT}" - name: Cache uses: actions/cache@v3 with: @@ -111,7 +111,7 @@ jobs: path: ./cypress/videos/e2e/main.spec.ts.mp4 - name: Get PR Number id: get-pr-num - run: echo "prnum=$(echo $GITHUB_REF | sed -e 's/[^0-9]//g')" >> $GITHUB_OUTPUT + run: echo "prnum=$(echo $GITHUB_REF | sed -e 's/[^0-9]//g')" >> "${GITHUB_OUTPUT}" - name: Add file env: FILE_PATH: ./cypress/videos/e2e/main.spec.ts.mp4 From 46f101574390a07e0c247a393bb3d59da2b08668 Mon Sep 17 00:00:00 2001 From: "yu.otsubo" Date: Sat, 14 Jan 2023 14:58:42 +0900 Subject: [PATCH 06/30] [skip netlify]action lint --- .github/workflows/previewDeploy.yml | 6 +++--- .github/workflows/snyk.yml | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/previewDeploy.yml b/.github/workflows/previewDeploy.yml index ccf75bc3b3..10c8092da3 100644 --- a/.github/workflows/previewDeploy.yml +++ b/.github/workflows/previewDeploy.yml @@ -111,11 +111,11 @@ jobs: path: ./cypress/videos/e2e/main.spec.ts.mp4 - name: Get PR Number id: get-pr-num - run: echo "prnum=$(echo $GITHUB_REF | sed -e 's/[^0-9]//g')" >> "${GITHUB_OUTPUT}" + run: echo "prnum=$(echo "${GITHUB_REF}" | sed -e 's/[^0-9]//g')" >> "${GITHUB_OUTPUT}" - name: Add file env: FILE_PATH: ./cypress/videos/e2e/main.spec.ts.mp4 - FILE_NAME: video-${{ matrix.os }}-${{ steps.get-pr-num.outputs.prnum }}-${{ github.head_ref }}-${{ matrix.width }}-main.spec.ts.mp4 + FILE_NAME: video-${{ steps.get-pr-num.outputs.prnum }}-${{ github.head_ref }}-${{ matrix.width }}-main.spec.ts.mp4 GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} HEAD_REF: ${{ github.head_ref }} GITHUB_REPOSITORY: "tubone24/blog" @@ -240,7 +240,7 @@ jobs: curl -X POST \ -H "Authorization: token ${GITHUB_TOKEN}" \ -d "{\"body\": \"$(cat cli.txt)\"}" \ - ${URL} + "${URL}" - name: get Netlify Draft URL if: ${{ !contains(needs.check-skip-flags.outputs.head-commit-message, '[skip netlify]') }} id: get-netlify-draft-url diff --git a/.github/workflows/snyk.yml b/.github/workflows/snyk.yml index d173a00bd5..c2ea208a1c 100644 --- a/.github/workflows/snyk.yml +++ b/.github/workflows/snyk.yml @@ -128,4 +128,4 @@ jobs: curl -X POST \ -H "Authorization: token ${GITHUB_TOKEN}" \ -d "{\"body\": \"$(cat summarize.txt)\"}" \ - ${URL} + "${URL}" From 7d181e781aa659c3d2ab5564debb9408d63e266c Mon Sep 17 00:00:00 2001 From: "yu.otsubo" Date: Sat, 14 Jan 2023 17:57:08 +0900 Subject: [PATCH 07/30] [skip netlify]action lint --- .github/workflows/previewDeploy.yml | 6 +++--- .shellcheckrc | 1 + 2 files changed, 4 insertions(+), 3 deletions(-) create mode 100644 .shellcheckrc diff --git a/.github/workflows/previewDeploy.yml b/.github/workflows/previewDeploy.yml index 10c8092da3..15a24edf6f 100644 --- a/.github/workflows/previewDeploy.yml +++ b/.github/workflows/previewDeploy.yml @@ -115,7 +115,7 @@ jobs: - name: Add file env: FILE_PATH: ./cypress/videos/e2e/main.spec.ts.mp4 - FILE_NAME: video-${{ steps.get-pr-num.outputs.prnum }}-${{ github.head_ref }}-${{ matrix.width }}-main.spec.ts.mp4 + FILE_NAME: video-${{ steps.get-pr-num.outputs.prnum }}-${{ github.head_ref }}-main.spec.ts.mp4 GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} HEAD_REF: ${{ github.head_ref }} GITHUB_REPOSITORY: "tubone24/blog" @@ -377,7 +377,7 @@ jobs: curl -X POST \ -H "Authorization: token ${GITHUB_TOKEN}" \ -d "{\"body\": \"$(cat test/memlab/data/out/leaks.txt)\"}" \ - ${URL} + "${URL}" textlint: name: textlint runs-on: ubuntu-latest @@ -483,7 +483,7 @@ jobs: curl -X POST \ -H "Authorization: token ${GITHUB_TOKEN}" \ -d "{\"body\": \"$(cat cli.txt)\"}" \ - ${URL} + "${URL}" bundle-analyzer-link: diff --git a/.shellcheckrc b/.shellcheckrc new file mode 100644 index 0000000000..0e634d6df7 --- /dev/null +++ b/.shellcheckrc @@ -0,0 +1 @@ +disable=SC2002 \ No newline at end of file From cc13ae79c1bb16b0ce4be2fb12245e697acda882 Mon Sep 17 00:00:00 2001 From: "yu.otsubo" Date: Sat, 14 Jan 2023 18:08:18 +0900 Subject: [PATCH 08/30] [skip netlify]action lint --- .github/workflows/common-lint.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/common-lint.yml b/.github/workflows/common-lint.yml index fe9af9a46d..d01199dab9 100644 --- a/.github/workflows/common-lint.yml +++ b/.github/workflows/common-lint.yml @@ -53,5 +53,5 @@ jobs: shell: bash - name: Check workflow files - run: ${{ steps.get_actionlint.outputs.executable }} -color + run: ${{ steps.get_actionlint.outputs.executable }} -color shellcheck= shell: bash From f6ee7768dfdbe09fd8b299766984d4eabdf3156a Mon Sep 17 00:00:00 2001 From: "yu.otsubo" Date: Sat, 14 Jan 2023 18:30:22 +0900 Subject: [PATCH 09/30] [skip netlify]action lint --- .github/workflows/common-lint.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/common-lint.yml b/.github/workflows/common-lint.yml index d01199dab9..b046fe15a0 100644 --- a/.github/workflows/common-lint.yml +++ b/.github/workflows/common-lint.yml @@ -51,7 +51,8 @@ jobs: id: get_actionlint run: bash <(curl https://raw.githubusercontent.com/rhysd/actionlint/main/scripts/download-actionlint.bash) shell: bash - + - name: which shellcheck + run: which shellcheck - name: Check workflow files run: ${{ steps.get_actionlint.outputs.executable }} -color shellcheck= shell: bash From b6fc94b1c4ab218bb505a35db2d301e7bbeea0c2 Mon Sep 17 00:00:00 2001 From: "yu.otsubo" Date: Sat, 14 Jan 2023 18:37:49 +0900 Subject: [PATCH 10/30] [skip netlify]action lint --- .github/workflows/common-lint.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/common-lint.yml b/.github/workflows/common-lint.yml index b046fe15a0..f0bcc20acf 100644 --- a/.github/workflows/common-lint.yml +++ b/.github/workflows/common-lint.yml @@ -54,5 +54,5 @@ jobs: - name: which shellcheck run: which shellcheck - name: Check workflow files - run: ${{ steps.get_actionlint.outputs.executable }} -color shellcheck= + run: ${{ steps.get_actionlint.outputs.executable }} -color shellcheck="/usr/bin/shellcheck -e SC2002" shell: bash From 4aef42bdd5de19d44387db105dd09fccda4c4338 Mon Sep 17 00:00:00 2001 From: "yu.otsubo" Date: Sat, 14 Jan 2023 18:42:50 +0900 Subject: [PATCH 11/30] [skip netlify]action lint --- .github/workflows/common-lint.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/common-lint.yml b/.github/workflows/common-lint.yml index f0bcc20acf..8a481d5893 100644 --- a/.github/workflows/common-lint.yml +++ b/.github/workflows/common-lint.yml @@ -54,5 +54,5 @@ jobs: - name: which shellcheck run: which shellcheck - name: Check workflow files - run: ${{ steps.get_actionlint.outputs.executable }} -color shellcheck="/usr/bin/shellcheck -e SC2002" + run: ${{ steps.get_actionlint.outputs.executable }} -color -shellcheck "/usr/bin/shellcheck -e SC2002" shell: bash From d64b8d89284a74da35a65fdbac71f04df31716a7 Mon Sep 17 00:00:00 2001 From: "yu.otsubo" Date: Sat, 14 Jan 2023 18:47:50 +0900 Subject: [PATCH 12/30] [skip netlify]action lint --- .github/workflows/common-lint.yml | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/.github/workflows/common-lint.yml b/.github/workflows/common-lint.yml index 8a481d5893..e827d10710 100644 --- a/.github/workflows/common-lint.yml +++ b/.github/workflows/common-lint.yml @@ -51,8 +51,6 @@ jobs: id: get_actionlint run: bash <(curl https://raw.githubusercontent.com/rhysd/actionlint/main/scripts/download-actionlint.bash) shell: bash - - name: which shellcheck - run: which shellcheck - name: Check workflow files - run: ${{ steps.get_actionlint.outputs.executable }} -color -shellcheck "/usr/bin/shellcheck -e SC2002" + run: ${{ steps.get_actionlint.outputs.executable }} -color -shellcheck "$(which shellcheck) -e SC2002" shell: bash From 66389ee90e370d628f446651a283dd84052b9111 Mon Sep 17 00:00:00 2001 From: "yu.otsubo" Date: Sat, 14 Jan 2023 20:52:43 +0900 Subject: [PATCH 13/30] [skip netlify]action lint --- .github/workflows/auto-assign-author.yml | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 .github/workflows/auto-assign-author.yml diff --git a/.github/workflows/auto-assign-author.yml b/.github/workflows/auto-assign-author.yml new file mode 100644 index 0000000000..1941e11ae4 --- /dev/null +++ b/.github/workflows/auto-assign-author.yml @@ -0,0 +1,16 @@ +name: Auto Assign Author + +on: + pull_request: + types: + - opened + +jobs: + assign: + if: github.actor != 'dependabot[bot]' + + name: Assign author to PR + runs-on: ubuntu-latest + steps: + - name: Assign author to PR + uses: technote-space/assign-author@v1 From 1a4682ccd7bb3b5713bdbf04111e0a9a35d156ae Mon Sep 17 00:00:00 2001 From: "yu.otsubo" Date: Sat, 14 Jan 2023 21:09:28 +0900 Subject: [PATCH 14/30] action lint --- .github/workflows/previewDeploy.yml | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/.github/workflows/previewDeploy.yml b/.github/workflows/previewDeploy.yml index 15a24edf6f..fd38368e05 100644 --- a/.github/workflows/previewDeploy.yml +++ b/.github/workflows/previewDeploy.yml @@ -246,6 +246,14 @@ jobs: id: get-netlify-draft-url run: | echo "draftUrl=$(cat cli.txt | sed -r 's/.*Website Draft URL: (.*)\\n\\nIf everything.*/\1/')" >> "${GITHUB_OUTPUT}" + - uses: chrnorm/deployment-action@v2 + if: ${{ !contains(needs.check-skip-flags.outputs.head-commit-message, '[skip netlify]') }} + name: Create GitHub deploy + id: deploymen + with: + token: ${{ secrets.GITHUB_TOKEN }} + environment: development + environment-url: ${{ steps.get-netlify-draft-url.outputs.draftUrl }} outputs: draftUrl: ${{ steps.get-netlify-draft-url.outputs.draftUrl }} From 67da5614431e27d47f78644c4dba1aeee0b7d0b5 Mon Sep 17 00:00:00 2001 From: "yu.otsubo" Date: Sat, 14 Jan 2023 21:10:00 +0900 Subject: [PATCH 15/30] action lint --- .github/workflows/previewDeploy.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/previewDeploy.yml b/.github/workflows/previewDeploy.yml index fd38368e05..800e6fc293 100644 --- a/.github/workflows/previewDeploy.yml +++ b/.github/workflows/previewDeploy.yml @@ -543,12 +543,14 @@ jobs: width: ${{ matrix.width }} delay: 10 - uses: actions/download-artifact@v3 + if: ${{ !contains(needs.check-skip-flags.outputs.head-commit-message, '[skip netlify]') }} with: name: screenshot-${{ matrix.os }}-${{ matrix.width }} - name: Get PR Number id: get-pr-num run: echo "prnum=$(echo $GITHUB_REF | sed -e 's/[^0-9]//g')" >> "${GITHUB_OUTPUT}" - name: PR Comments + if: ${{ !contains(needs.check-skip-flags.outputs.head-commit-message, '[skip netlify]') }} env: FILE_PATH: screenshot-${{ matrix.os }}-${{ matrix.width }}.png FILE_NAME: screenshot-${{ matrix.os }}-${{ steps.get-pr-num.outputs.prnum }}-${{ github.head_ref }}-${{ matrix.width }}.png From 141a45eb914a740bc650ba7edb8bf475a6682577 Mon Sep 17 00:00:00 2001 From: "yu.otsubo" Date: Sat, 14 Jan 2023 21:28:33 +0900 Subject: [PATCH 16/30] action lint --- .github/workflows/previewDeploy.yml | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/.github/workflows/previewDeploy.yml b/.github/workflows/previewDeploy.yml index 800e6fc293..4c34b4d078 100644 --- a/.github/workflows/previewDeploy.yml +++ b/.github/workflows/previewDeploy.yml @@ -248,12 +248,22 @@ jobs: echo "draftUrl=$(cat cli.txt | sed -r 's/.*Website Draft URL: (.*)\\n\\nIf everything.*/\1/')" >> "${GITHUB_OUTPUT}" - uses: chrnorm/deployment-action@v2 if: ${{ !contains(needs.check-skip-flags.outputs.head-commit-message, '[skip netlify]') }} - name: Create GitHub deploy - id: deploymen + name: Create GitHub deploy (Success) + id: deployment-dev with: token: ${{ secrets.GITHUB_TOKEN }} environment: development environment-url: ${{ steps.get-netlify-draft-url.outputs.draftUrl }} + state: "success" + - uses: chrnorm/deployment-action@v2 + if: ${{ !contains(needs.check-skip-flags.outputs.head-commit-message, '[skip netlify]') }} && failure() + name: Create GitHub deploy (Failure) + id: deployment-dev + with: + token: ${{ secrets.GITHUB_TOKEN }} + environment: development + environment-url: ${{ steps.get-netlify-draft-url.outputs.draftUrl }} + state: "failure" outputs: draftUrl: ${{ steps.get-netlify-draft-url.outputs.draftUrl }} From 903b8b73627301a480a268bc932717e22c8919dd Mon Sep 17 00:00:00 2001 From: "yu.otsubo" Date: Sat, 14 Jan 2023 21:29:59 +0900 Subject: [PATCH 17/30] action lint --- .github/workflows/deploy.yml | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index f4c16ce2e7..a6ee38c92a 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -233,6 +233,24 @@ jobs: env: NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }} NETLIFY_SITE_ID: ${{ secrets.NETLIFY_SITE_ID }} + - uses: chrnorm/deployment-action@v2 + if: success() + name: Create GitHub deploy (Success) + id: deployment-prod + with: + token: ${{ secrets.GITHUB_TOKEN }} + environment: production + environment-url: "https://blog.tubone-project24.xyz" + state: "success" + - uses: chrnorm/deployment-action@v2 + if: failure() + name: Create GitHub deploy (Failure) + id: deployment-prod + with: + token: ${{ secrets.GITHUB_TOKEN }} + environment: production + environment-url: "https://blog.tubone-project24.xyz" + state: "failure" storybook: runs-on: ubuntu-latest steps: From 0429766de33360ac6ae2e2e518224b13d9b5b0d6 Mon Sep 17 00:00:00 2001 From: "yu.otsubo" Date: Sat, 14 Jan 2023 21:33:28 +0900 Subject: [PATCH 18/30] action lint --- .github/workflows/deploy.yml | 1 - .github/workflows/previewDeploy.yml | 1 - 2 files changed, 2 deletions(-) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index a6ee38c92a..08699ca5eb 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -245,7 +245,6 @@ jobs: - uses: chrnorm/deployment-action@v2 if: failure() name: Create GitHub deploy (Failure) - id: deployment-prod with: token: ${{ secrets.GITHUB_TOKEN }} environment: production diff --git a/.github/workflows/previewDeploy.yml b/.github/workflows/previewDeploy.yml index 4c34b4d078..9cc4ca7b8f 100644 --- a/.github/workflows/previewDeploy.yml +++ b/.github/workflows/previewDeploy.yml @@ -258,7 +258,6 @@ jobs: - uses: chrnorm/deployment-action@v2 if: ${{ !contains(needs.check-skip-flags.outputs.head-commit-message, '[skip netlify]') }} && failure() name: Create GitHub deploy (Failure) - id: deployment-dev with: token: ${{ secrets.GITHUB_TOKEN }} environment: development From 949d25bdb366ad21036d1954aa65b8dfa937832a Mon Sep 17 00:00:00 2001 From: "yu.otsubo" Date: Sat, 14 Jan 2023 21:43:43 +0900 Subject: [PATCH 19/30] action lint --- .github/release.yml | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 .github/release.yml diff --git a/.github/release.yml b/.github/release.yml new file mode 100644 index 0000000000..ae58332f12 --- /dev/null +++ b/.github/release.yml @@ -0,0 +1,22 @@ +changelog: + exclude: + labels: + - ignore-for-release + authors: + - renovate + - dependabot + categories: + - title: Breaking Changes 🛠 + labels: + - Semver-Major + - breaking-change + - title: Exciting New Features 🎉 + labels: + - Semver-Minor + - enhancement + - title: Update Article 🎉 + labels: + - article + - title: Other Changes + labels: + - "*" From f546bc3e9640152e01a09c977007a6630a064396 Mon Sep 17 00:00:00 2001 From: "yu.otsubo" Date: Sat, 14 Jan 2023 21:52:08 +0900 Subject: [PATCH 20/30] action lint --- .github/workflows/previewDeploy.yml | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/.github/workflows/previewDeploy.yml b/.github/workflows/previewDeploy.yml index 9cc4ca7b8f..6edef7d81d 100644 --- a/.github/workflows/previewDeploy.yml +++ b/.github/workflows/previewDeploy.yml @@ -173,6 +173,13 @@ jobs: steps: - name: Checkout source code uses: actions/checkout@v3 + - uses: chrnorm/deployment-action@v2 + name: Create GitHub deployment + id: deployment-dev + with: + token: ${{ secrets.GITHUB_TOKEN }} + environment: development + environment-url: "" - name: Setup Node uses: actions/setup-node@v3 with: @@ -249,11 +256,11 @@ jobs: - uses: chrnorm/deployment-action@v2 if: ${{ !contains(needs.check-skip-flags.outputs.head-commit-message, '[skip netlify]') }} name: Create GitHub deploy (Success) - id: deployment-dev with: token: ${{ secrets.GITHUB_TOKEN }} environment: development environment-url: ${{ steps.get-netlify-draft-url.outputs.draftUrl }} + deployment-id: ${{ steps.deployment-dev.outputs.deployment_id }} state: "success" - uses: chrnorm/deployment-action@v2 if: ${{ !contains(needs.check-skip-flags.outputs.head-commit-message, '[skip netlify]') }} && failure() @@ -262,6 +269,7 @@ jobs: token: ${{ secrets.GITHUB_TOKEN }} environment: development environment-url: ${{ steps.get-netlify-draft-url.outputs.draftUrl }} + deployment-id: ${{ steps.deployment-dev.outputs.deployment_id }} state: "failure" outputs: draftUrl: ${{ steps.get-netlify-draft-url.outputs.draftUrl }} From d050e3440d0132d46c0e4beed6cb12b2205e1c51 Mon Sep 17 00:00:00 2001 From: "yu.otsubo" Date: Sat, 14 Jan 2023 21:55:14 +0900 Subject: [PATCH 21/30] action lint --- .github/workflows/deploy.yml | 9 ++++++++- .github/workflows/previewDeploy.yml | 3 +-- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 08699ca5eb..0f19693eb8 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -172,6 +172,12 @@ jobs: steps: - name: Checkout source code uses: actions/checkout@v3 + - uses: chrnorm/deployment-action@v2 + name: Create GitHub deployment + id: deployment-prod + with: + token: ${{ secrets.GITHUB_TOKEN }} + environment: production - name: Setup Node uses: actions/setup-node@v3 with: @@ -236,11 +242,11 @@ jobs: - uses: chrnorm/deployment-action@v2 if: success() name: Create GitHub deploy (Success) - id: deployment-prod with: token: ${{ secrets.GITHUB_TOKEN }} environment: production environment-url: "https://blog.tubone-project24.xyz" + deployment-id: ${{ steps.deployment-prod.outputs.deployment_id }} state: "success" - uses: chrnorm/deployment-action@v2 if: failure() @@ -249,6 +255,7 @@ jobs: token: ${{ secrets.GITHUB_TOKEN }} environment: production environment-url: "https://blog.tubone-project24.xyz" + deployment-id: ${{ steps.deployment-prod.outputs.deployment_id }} state: "failure" storybook: runs-on: ubuntu-latest diff --git a/.github/workflows/previewDeploy.yml b/.github/workflows/previewDeploy.yml index 6edef7d81d..5523daa2e8 100644 --- a/.github/workflows/previewDeploy.yml +++ b/.github/workflows/previewDeploy.yml @@ -179,7 +179,6 @@ jobs: with: token: ${{ secrets.GITHUB_TOKEN }} environment: development - environment-url: "" - name: Setup Node uses: actions/setup-node@v3 with: @@ -254,7 +253,7 @@ jobs: run: | echo "draftUrl=$(cat cli.txt | sed -r 's/.*Website Draft URL: (.*)\\n\\nIf everything.*/\1/')" >> "${GITHUB_OUTPUT}" - uses: chrnorm/deployment-action@v2 - if: ${{ !contains(needs.check-skip-flags.outputs.head-commit-message, '[skip netlify]') }} + if: ${{ !contains(needs.check-skip-flags.outputs.head-commit-message, '[skip netlify]') }} %% success() name: Create GitHub deploy (Success) with: token: ${{ secrets.GITHUB_TOKEN }} From 490f4dfc31072d12d8f2d465d05baaba3782eb3d Mon Sep 17 00:00:00 2001 From: "yu.otsubo" Date: Sat, 14 Jan 2023 21:59:30 +0900 Subject: [PATCH 22/30] action lint --- .github/workflows/deploy.yml | 4 ++-- .github/workflows/previewDeploy.yml | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 0f19693eb8..0417ec4507 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -239,7 +239,7 @@ jobs: env: NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }} NETLIFY_SITE_ID: ${{ secrets.NETLIFY_SITE_ID }} - - uses: chrnorm/deployment-action@v2 + - uses: chrnorm/deployment-status@v2 if: success() name: Create GitHub deploy (Success) with: @@ -248,7 +248,7 @@ jobs: environment-url: "https://blog.tubone-project24.xyz" deployment-id: ${{ steps.deployment-prod.outputs.deployment_id }} state: "success" - - uses: chrnorm/deployment-action@v2 + - uses: chrnorm/deployment-status@v2 if: failure() name: Create GitHub deploy (Failure) with: diff --git a/.github/workflows/previewDeploy.yml b/.github/workflows/previewDeploy.yml index 5523daa2e8..b2bc1cdacd 100644 --- a/.github/workflows/previewDeploy.yml +++ b/.github/workflows/previewDeploy.yml @@ -252,7 +252,7 @@ jobs: id: get-netlify-draft-url run: | echo "draftUrl=$(cat cli.txt | sed -r 's/.*Website Draft URL: (.*)\\n\\nIf everything.*/\1/')" >> "${GITHUB_OUTPUT}" - - uses: chrnorm/deployment-action@v2 + - uses: chrnorm/deployment-status@v2 if: ${{ !contains(needs.check-skip-flags.outputs.head-commit-message, '[skip netlify]') }} %% success() name: Create GitHub deploy (Success) with: @@ -261,7 +261,7 @@ jobs: environment-url: ${{ steps.get-netlify-draft-url.outputs.draftUrl }} deployment-id: ${{ steps.deployment-dev.outputs.deployment_id }} state: "success" - - uses: chrnorm/deployment-action@v2 + - uses: chrnorm/deployment-status@v2 if: ${{ !contains(needs.check-skip-flags.outputs.head-commit-message, '[skip netlify]') }} && failure() name: Create GitHub deploy (Failure) with: From 6f74716f87f3d33ef41f46ec3b4f0f0e412ceb43 Mon Sep 17 00:00:00 2001 From: "yu.otsubo" Date: Sat, 14 Jan 2023 22:00:23 +0900 Subject: [PATCH 23/30] action lint --- .github/workflows/previewDeploy.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/previewDeploy.yml b/.github/workflows/previewDeploy.yml index b2bc1cdacd..f26ce415d9 100644 --- a/.github/workflows/previewDeploy.yml +++ b/.github/workflows/previewDeploy.yml @@ -253,7 +253,7 @@ jobs: run: | echo "draftUrl=$(cat cli.txt | sed -r 's/.*Website Draft URL: (.*)\\n\\nIf everything.*/\1/')" >> "${GITHUB_OUTPUT}" - uses: chrnorm/deployment-status@v2 - if: ${{ !contains(needs.check-skip-flags.outputs.head-commit-message, '[skip netlify]') }} %% success() + if: ${{ !contains(needs.check-skip-flags.outputs.head-commit-message, '[skip netlify]') }} && success() name: Create GitHub deploy (Success) with: token: ${{ secrets.GITHUB_TOKEN }} From 693af9aac62e0c0e0e63361186e2c753b44b221c Mon Sep 17 00:00:00 2001 From: "yu.otsubo" Date: Sat, 14 Jan 2023 22:07:23 +0900 Subject: [PATCH 24/30] action lint --- .github/workflows/previewDeploy.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/previewDeploy.yml b/.github/workflows/previewDeploy.yml index f26ce415d9..f6ce20b26b 100644 --- a/.github/workflows/previewDeploy.yml +++ b/.github/workflows/previewDeploy.yml @@ -253,7 +253,7 @@ jobs: run: | echo "draftUrl=$(cat cli.txt | sed -r 's/.*Website Draft URL: (.*)\\n\\nIf everything.*/\1/')" >> "${GITHUB_OUTPUT}" - uses: chrnorm/deployment-status@v2 - if: ${{ !contains(needs.check-skip-flags.outputs.head-commit-message, '[skip netlify]') }} && success() + if: ${{ !contains(needs.check-skip-flags.outputs.head-commit-message, '[skip netlify]') && success() }} name: Create GitHub deploy (Success) with: token: ${{ secrets.GITHUB_TOKEN }} @@ -262,7 +262,7 @@ jobs: deployment-id: ${{ steps.deployment-dev.outputs.deployment_id }} state: "success" - uses: chrnorm/deployment-status@v2 - if: ${{ !contains(needs.check-skip-flags.outputs.head-commit-message, '[skip netlify]') }} && failure() + if: ${{ !contains(needs.check-skip-flags.outputs.head-commit-message, '[skip netlify]') && failure() }} name: Create GitHub deploy (Failure) with: token: ${{ secrets.GITHUB_TOKEN }} From ee475f3652ac0210cd9f08dd502ae3beffab3c3c Mon Sep 17 00:00:00 2001 From: "yu.otsubo" Date: Sat, 14 Jan 2023 22:19:51 +0900 Subject: [PATCH 25/30] action lint --- .github/workflows/deploy.yml | 24 ++++++++++++++++++++++++ .github/workflows/previewDeploy.yml | 29 +++++++++++++++++++++++++++++ 2 files changed, 53 insertions(+) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 0417ec4507..2105bf87b8 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -262,6 +262,12 @@ jobs: steps: - name: Checkout source code uses: actions/checkout@v3 + - uses: chrnorm/deployment-action@v2 + name: Create GitHub deployment + id: deployment-prod-storybook + with: + token: ${{ secrets.GITHUB_TOKEN }} + environment: production-storybook - name: Get yarn cache directory path id: yarn-cache-dir-path run: echo "dir=$(yarn cache dir)" >> "${GITHUB_OUTPUT}" @@ -307,6 +313,24 @@ jobs: env: NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_STORYBOOK_AUTH_TOKEN }} NETLIFY_SITE_ID: ${{ secrets.NETLIFY_STORYBOOK_SITE_ID }} + - uses: chrnorm/deployment-status@v2 + if: success() + name: Create GitHub deploy (Success) + with: + token: ${{ secrets.GITHUB_TOKEN }} + environment: production-storybook + environment-url: "https://blog-storybook.netlify.app" + deployment-id: ${{ steps.deployment-prod-storybook.outputs.deployment_id }} + state: "success" + - uses: chrnorm/deployment-status@v2 + if: failure() + name: Create GitHub deploy (Failure) + with: + token: ${{ secrets.GITHUB_TOKEN }} + environment: production-storybook + environment-url: "https://blog-storybook.netlify.app" + deployment-id: ${{ steps.deployment-prod-storybook.outputs.deployment_id }} + state: "failure" lighthouse: runs-on: macos-latest needs: ['build'] diff --git a/.github/workflows/previewDeploy.yml b/.github/workflows/previewDeploy.yml index f6ce20b26b..451ec4e5f6 100644 --- a/.github/workflows/previewDeploy.yml +++ b/.github/workflows/previewDeploy.yml @@ -444,6 +444,12 @@ jobs: steps: - name: Checkout source code uses: actions/checkout@v3 + - uses: chrnorm/deployment-action@v2 + name: Create GitHub deployment + id: deployment-dev-storybook + with: + token: ${{ secrets.GITHUB_TOKEN }} + environment: development-storybook - name: Get yarn cache directory path id: yarn-cache-dir-path run: echo "dir=$(yarn cache dir)" >> "${GITHUB_OUTPUT}" @@ -508,6 +514,29 @@ jobs: -H "Authorization: token ${GITHUB_TOKEN}" \ -d "{\"body\": \"$(cat cli.txt)\"}" \ "${URL}" + - name: get Netlify Draft URL + if: ${{ !contains(needs.check-skip-flags.outputs.head-commit-message, '[skip netlify]') }} + id: get-netlify-draft-url + run: | + echo "draftUrl=$(cat cli.txt | sed -r 's/.*Website Draft URL: (.*)\\n\\nIf everything.*/\1/')" >> "${GITHUB_OUTPUT}" + - uses: chrnorm/deployment-status@v2 + if: ${{ !contains(needs.check-skip-flags.outputs.head-commit-message, '[skip netlify]') && success() }} + name: Create GitHub deploy (Success) + with: + token: ${{ secrets.GITHUB_TOKEN }} + environment: development-storybook + environment-url: ${{ steps.get-netlify-draft-url.outputs.draftUrl }} + deployment-id: ${{ steps.deployment-dev-storybook.outputs.deployment_id }} + state: "success" + - uses: chrnorm/deployment-status@v2 + if: ${{ !contains(needs.check-skip-flags.outputs.head-commit-message, '[skip netlify]') && failure() }} + name: Create GitHub deploy (Failure) + with: + token: ${{ secrets.GITHUB_TOKEN }} + environment: development-storybook + environment-url: ${{ steps.get-netlify-draft-url.outputs.draftUrl }} + deployment-id: ${{ steps.deployment-dev-storybook.outputs.deployment_id }} + state: "failure" bundle-analyzer-link: From 970ae80c5165908f4970dd48a78340528b79c363 Mon Sep 17 00:00:00 2001 From: "yu.otsubo" Date: Sat, 14 Jan 2023 22:38:46 +0900 Subject: [PATCH 26/30] action lint --- .github/workflows/deploy.yml | 35 +++++++++++++++++++++--- .github/workflows/previewDeploy.yml | 41 ++++++++++++++++++++++++----- .github/workflows/snyk.yml | 2 +- .github/workflows/tfsec.yml | 6 +++-- 4 files changed, 70 insertions(+), 14 deletions(-) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 2105bf87b8..622ff114eb 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -7,6 +7,33 @@ env: cache-version: v2 jobs: + create-cache: + runs-on: ubuntu-latest + steps: + - name: Checkout source code + uses: actions/checkout@v3 + - name: Setup Node + uses: actions/setup-node@v3 + with: + node-version: 16.x + - name: Get yarn cache directory path + id: yarn-cache-dir-path + run: echo "dir=$(yarn cache dir)" >> "${GITHUB_OUTPUT}" + - name: Cache + uses: actions/cache@v3 + with: + path: | + ~/.cache + ${{ steps.yarn-cache-dir-path.outputs.dir }} + node_modules + key: ${{ runner.os }}-build-${{ env.cache-version }}-${{ hashFiles('**/yarn.lock') }} + restore-keys: | + ${{ runner.os }}-build-${{ env.cache-version }}-${{ hashFiles('**/yarn.lock') }} + ${{ runner.os }}-build-${{ env.cache-version }}- + - name: yarn install + env: + NODE_AUTH_TOKEN: ${{secrets.GITHUB_TOKEN}} + run: yarn install --frozen-lockfile test: runs-on: ubuntu-latest steps: @@ -29,7 +56,7 @@ jobs: id: yarn-cache-dir-path run: echo "dir=$(yarn cache dir)" >> "${GITHUB_OUTPUT}" - name: Cache - uses: actions/cache@v3 + uses: actions/cache/restore@v3 with: path: | ~/.cache @@ -134,7 +161,7 @@ jobs: id: yarn-cache-dir-path run: echo "dir=$(yarn cache dir)" >> "${GITHUB_OUTPUT}" - name: Cache - uses: actions/cache@v3 + uses: actions/cache/restore@v3 with: path: | ~/.cache @@ -188,7 +215,7 @@ jobs: id: yarn-cache-dir-path run: echo "dir=$(yarn cache dir)" >> "${GITHUB_OUTPUT}" - name: Cache - uses: actions/cache@v3 + uses: actions/cache/restore@v3 with: path: | ~/.cache @@ -272,7 +299,7 @@ jobs: id: yarn-cache-dir-path run: echo "dir=$(yarn cache dir)" >> "${GITHUB_OUTPUT}" - name: Cache - uses: actions/cache@v3 + uses: actions/cache/restore@v3 with: path: | ~/.cache diff --git a/.github/workflows/previewDeploy.yml b/.github/workflows/previewDeploy.yml index 451ec4e5f6..bc243ce3d1 100644 --- a/.github/workflows/previewDeploy.yml +++ b/.github/workflows/previewDeploy.yml @@ -21,6 +21,33 @@ jobs: id: get-head-commit-message run: | echo "headCommitMsg=$(git show -s --format=%s)" >> "${GITHUB_OUTPUT}" + create-cache: + runs-on: ubuntu-latest + steps: + - name: Checkout source code + uses: actions/checkout@v3 + - name: Setup Node + uses: actions/setup-node@v3 + with: + node-version: 16.x + - name: Get yarn cache directory path + id: yarn-cache-dir-path + run: echo "dir=$(yarn cache dir)" >> "${GITHUB_OUTPUT}" + - name: Cache + uses: actions/cache@v3 + with: + path: | + ~/.cache + ${{ steps.yarn-cache-dir-path.outputs.dir }} + node_modules + key: ${{ runner.os }}-build-${{ env.cache-version }}-${{ hashFiles('**/yarn.lock') }} + restore-keys: | + ${{ runner.os }}-build-${{ env.cache-version }}-${{ hashFiles('**/yarn.lock') }} + ${{ runner.os }}-build-${{ env.cache-version }}- + - name: yarn install + env: + NODE_AUTH_TOKEN: ${{secrets.GITHUB_TOKEN}} + run: yarn install --frozen-lockfile test: runs-on: ubuntu-latest steps: @@ -43,7 +70,7 @@ jobs: id: yarn-cache-dir-path run: echo "dir=$(yarn cache dir)" >> "${GITHUB_OUTPUT}" - name: Cache - uses: actions/cache@v3 + uses: actions/cache/restore@v3 with: path: | ~/.cache @@ -137,7 +164,7 @@ jobs: id: yarn-cache-dir-path run: echo "dir=$(yarn cache dir)" >> "${GITHUB_OUTPUT}" - name: Cache - uses: actions/cache@v3 + uses: actions/cache/restore@v3 with: path: | ~/.cache @@ -189,7 +216,7 @@ jobs: id: yarn-cache-dir-path run: echo "dir=$(yarn cache dir)" >> "${GITHUB_OUTPUT}" - name: Cache - uses: actions/cache@v3 + uses: actions/cache/restore@v3 with: path: | ~/.cache @@ -291,7 +318,7 @@ jobs: id: yarn-cache-dir-path run: echo "dir=$(yarn cache dir)" >> "${GITHUB_OUTPUT}" - name: Cache - uses: actions/cache@v3 + uses: actions/cache/restore@v3 with: path: | ~/.cache @@ -356,7 +383,7 @@ jobs: id: yarn-cache-dir-path run: echo "dir=$(yarn cache dir)" >> "${GITHUB_OUTPUT}" - name: Cache - uses: actions/cache@v3 + uses: actions/cache/restore@v3 with: path: | ~/.cache @@ -416,7 +443,7 @@ jobs: id: yarn-cache-dir-path run: echo "dir=$(yarn cache dir)" >> "${GITHUB_OUTPUT}" - name: Cache - uses: actions/cache@v3 + uses: actions/cache/restore@v3 with: path: | ~/.cache @@ -454,7 +481,7 @@ jobs: id: yarn-cache-dir-path run: echo "dir=$(yarn cache dir)" >> "${GITHUB_OUTPUT}" - name: Cache - uses: actions/cache@v3 + uses: actions/cache/restore@v3 with: path: | ~/.cache diff --git a/.github/workflows/snyk.yml b/.github/workflows/snyk.yml index c2ea208a1c..bb8c6681b5 100644 --- a/.github/workflows/snyk.yml +++ b/.github/workflows/snyk.yml @@ -29,7 +29,7 @@ jobs: id: yarn-cache-dir-path run: echo "dir=$(yarn cache dir)" >> "${GITHUB_OUTPUT}" - name: Cache - uses: actions/cache@v3 + uses: actions/cache/restore@v3 with: path: | ~/.cache diff --git a/.github/workflows/tfsec.yml b/.github/workflows/tfsec.yml index 9226feeebc..b995ed181e 100644 --- a/.github/workflows/tfsec.yml +++ b/.github/workflows/tfsec.yml @@ -7,9 +7,11 @@ name: tfsec on: push: - branches: [ "master" ] + branches: + - master pull_request: - branches: [ "master" ] + branches: + - master schedule: - cron: '32 6 * * 6' From 67b8976f27d610a6ba2cb73b44304196a23fda0e Mon Sep 17 00:00:00 2001 From: "yu.otsubo" Date: Sat, 14 Jan 2023 22:46:10 +0900 Subject: [PATCH 27/30] [skip netlify]action lint --- .github/PULL_REQUEST_TEMPLATE.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md index 3497ce6d27..56e7b96bce 100644 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -49,16 +49,16 @@ List general components of the application that this PR will affect: ## Screenshot -Replace FIXME_BRANCH_NAME in the URL below with this branch name. +Replace `FIXME_BRANCH_NAME`, `FIXME_PR_NUMBER` in the URL below with this branch name and PR number. ### Desktop Width 1200px -![Desktop Home](https://raw.githubusercontent.com/tubone24/blog/screenshot/docs/screenshot/FIXME_BRANCH_NAME/screenshot-ubuntu-latest-1200.png) +![Desktop Home](https://raw.githubusercontent.com/tubone24/blog/screenshot/docs/screenshot/FIXME_BRANCH_NAME/screenshot-ubuntu-latest-FIXME_PR_NUMBER-FIXME_BRANCH_NAME-1200.png) ### Mobile Width 400px -mobile home +mobile home From 787025d71d6c5aefdaf2896d0d1b64320699ad4f Mon Sep 17 00:00:00 2001 From: "yu.otsubo" Date: Sat, 14 Jan 2023 22:52:52 +0900 Subject: [PATCH 28/30] [skip netlify]action lint --- CHANGELOG.md | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 CHANGELOG.md diff --git a/CHANGELOG.md b/CHANGELOG.md new file mode 100644 index 0000000000..855f67d8ed --- /dev/null +++ b/CHANGELOG.md @@ -0,0 +1,3 @@ +# CHANGELOG + +See [GitHub Releases](https://github.com/tubone24/blog/releases). From 32c3dc971bdc5103a344a4148bceb77300fe11b1 Mon Sep 17 00:00:00 2001 From: "yu.otsubo" Date: Sat, 14 Jan 2023 23:03:12 +0900 Subject: [PATCH 29/30] [skip netlify]action lint --- README.md | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index e5510899a3..5c38e721b1 100644 --- a/README.md +++ b/README.md @@ -22,7 +22,7 @@ This is tubone's Blog by Gatsby and Netlify. ## Preview -Screenshots from the last deployment on the master branch. +[Screenshots](https://github.com/tubone24/blog/tree/screenshot) from the last deployment on the master branch. ### Desktop @@ -46,7 +46,7 @@ Special, thanks! ### Structure -- Gatsby.js v4, Static site generating +- [Gatsby.js v4](https://www.gatsbyjs.com/gatsby-4/), Static site generating - Use [Preact](https://preactjs.com/), faster than [React](https://ja.reactjs.org/) - All Components writen by [TypeScript](https://www.typescriptlang.org/) - Use [Bootstrap5](https://getbootstrap.jp/) for CSS Framework @@ -85,6 +85,7 @@ Special, thanks! - Detect browser's memory leaks by [memlab](https://github.com/facebookincubator/memlab) - Detect vulnerability by [Snyk](https://app.snyk.io/) - Detect vulnerability by [OWASP ZAP](https://www.zaproxy.org/) +- Capture [some width screenshots](https://github.com/tubone24/blog/tree/screenshot) every PR and push master. ### For contributor of articles @@ -359,6 +360,16 @@ Last 14 days, CI Score by [meercode.io](https://meercode.io) ![blog Actions](https://api.meercode.io/badge/tubone24/blog?type=ci-success-rate&lastDay=14) +## Change log and versioning + +This Blog's CHANGELOG integrated [GitHub Releases](https://github.com/tubone24/blog/releases). + +And this blog's versioning policy is [semver](https://semver.org/) + +- MAJOR version when you make incompatible API changes +- MINOR version when you add functionality in a backwards compatible manner or **create articles**. +- PATCH version when you make backwards compatible bug fixes or **update (include delete) articles**. + ## License - The source code under the MIT LICENSE. From c525132f8f743ee711cbd874971b315cd190e980 Mon Sep 17 00:00:00 2001 From: "yu.otsubo" Date: Sat, 14 Jan 2023 23:08:51 +0900 Subject: [PATCH 30/30] [skip netlify]action lint --- README.md | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 5c38e721b1..5b7bb9b9cd 100644 --- a/README.md +++ b/README.md @@ -3,6 +3,7 @@ > Super powerfully all-packaged blog system [![Twitter URL](https://img.shields.io/twitter/url/https/blog.tubone-project24.xyz?style=social)](https://twitter.com/intent/tweet?text=LikeThis:&url=https%3A%2F%2Fblog.tubone-project24.xyz) +[![Release Version](https://release-badges-generator.vercel.app/api/releases.svg?user=tubone24&repo=blog&gradient=00ffff,8bd1fa)](https://github.com/tubone24/blog/releases/latest) [![Netlify Status](https://api.netlify.com/api/v1/badges/3751ef40-b145-4249-9657-39d3fb04ae81/deploy-status)](https://app.netlify.com/sites/pensive-lamport-5822d2/deploys) [![DeployToNetlifyPRD](https://github.com/tubone24/blog/workflows/DeployToNetlifyPRD/badge.svg)](https://github.com/tubone24/blog/actions?query=workflow%3ADeployToNetlifyPRD) [![Coverage Status](https://coveralls.io/repos/github/tubone24/blog/badge.svg?branch=master)](https://coveralls.io/github/tubone24/blog?branch=master) @@ -13,6 +14,7 @@ ![blog Actions](https://api.meercode.io/badge/tubone24/blog?type=ci-score&lastDay=184) [![websiteup](https://img.shields.io/website.svg?down_color=red&down_message=down&up_color=green&up_message=up&url=https%3A%2F%2Fblog.tubone-project24.xyz)](https://blog.tubone-project24.xyz) [![Buy me a coffee](https://camo.githubusercontent.com/3c1dd7a8a20dafe2a0b9b3b14ddaec4b63f73060625d1456761e9fd2e71f82bc/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f42794d6541436f666665652d7475626f6e6532342d627269676874677265656e3f6c6f676f3d4275792532304d6525323041253230436f66666565)](https://www.buymeacoffee.com/tubone24) +[![PRs welcome!](https://img.shields.io/badge/PRs-welcome-brightgreen.svg)](https://github.com/tubone24/blog/blob/master/CONTRIBUTING.md) ## What is this? @@ -362,9 +364,9 @@ Last 14 days, CI Score by [meercode.io](https://meercode.io) ## Change log and versioning -This Blog's CHANGELOG integrated [GitHub Releases](https://github.com/tubone24/blog/releases). +This Blog's CHANGELOG integrated [GitHub Releases](https://github.com/tubone24/blog/releases) -And this blog's versioning policy is [semver](https://semver.org/) +And this blog's versioning policy is [semver](https://semver.org/) like `1.0.1` - MAJOR version when you make incompatible API changes - MINOR version when you add functionality in a backwards compatible manner or **create articles**.