Skip to content

Commit

Permalink
Merge pull request #1239 from tubone24/lint
Browse files Browse the repository at this point in the history
[skip netlify]action lint
  • Loading branch information
tubone24 committed Jan 14, 2023
2 parents 5d210f6 + c525132 commit 7f6e255
Show file tree
Hide file tree
Showing 12 changed files with 267 additions and 42 deletions.
6 changes: 3 additions & 3 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

<img src="https://github.com/tubone24/blog/blob/screenshot/docs/screenshot/FIXME_BRANCH_NAME/screenshot-ubuntu-latest-400.png" width="200px" alt="mobile home" />
<img src="https://github.com/tubone24/blog/blob/screenshot/docs/screenshot/FIXME_BRANCH_NAME/screenshot-ubuntu-latest-FIXME_PR_NUMBER-FIXME_BRANCH_NAME-400.png" width="200px" alt="mobile home" />
22 changes: 22 additions & 0 deletions .github/release.yml
Original file line number Diff line number Diff line change
@@ -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:
- "*"
16 changes: 16 additions & 0 deletions .github/workflows/auto-assign-author.yml
Original file line number Diff line number Diff line change
@@ -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
13 changes: 12 additions & 1 deletion .github/workflows/common-lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -43,3 +43,14 @@ jobs:
uses: suzuki-shunsuke/[email protected]
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 -shellcheck "$(which shellcheck) -e SC2002"
shell: bash
91 changes: 83 additions & 8 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -27,9 +54,9 @@ 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
uses: actions/cache/restore@v3
with:
path: |
~/.cache
Expand Down Expand Up @@ -132,9 +159,9 @@ 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
uses: actions/cache/restore@v3
with:
path: |
~/.cache
Expand Down Expand Up @@ -172,6 +199,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:
Expand All @@ -180,9 +213,9 @@ 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
uses: actions/cache/restore@v3
with:
path: |
~/.cache
Expand Down Expand Up @@ -233,16 +266,40 @@ jobs:
env:
NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }}
NETLIFY_SITE_ID: ${{ secrets.NETLIFY_SITE_ID }}
- uses: chrnorm/deployment-status@v2
if: success()
name: Create GitHub deploy (Success)
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-status@v2
if: failure()
name: Create GitHub deploy (Failure)
with:
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
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
run: echo "dir=$(yarn cache dir)" >> "${GITHUB_OUTPUT}"
- name: Cache
uses: actions/cache@v3
uses: actions/cache/restore@v3
with:
path: |
~/.cache
Expand Down Expand Up @@ -283,6 +340,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']
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/owaspzap.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
Loading

0 comments on commit 7f6e255

Please sign in to comment.