This repository has been archived by the owner on Feb 4, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* fix: CIの権限、及び処理を修正 よりセキュアにし、ドキュメントをもとに適切にcachingを施した * fix: lhciのバージョンを修正 * fix: yarn add -g というオプションは存在しないぞ糸川
- Loading branch information
Showing
8 changed files
with
116 additions
and
143 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
name: Chromatic test | ||
|
||
on: | ||
pull_request: | ||
branches: | ||
- dev | ||
paths: | ||
- src/components/** | ||
- src/stories/** | ||
- package.json | ||
- yarn.lock | ||
|
||
jobs: | ||
run-chromatic-test: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
- name: Setup Node.js environment | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: 18 | ||
cache: yarn | ||
- name: Install Dependencies | ||
run: yarn install --immutable | ||
- name: Build Storybook | ||
run: yarn run build-storybook | ||
run-chromatic-test-check: | ||
if: ${{ ! failure() }} | ||
needs: run-chromatic-test | ||
runs-on: ubuntu-latest | ||
steps: | ||
- run: echo "Chromatic test is successfully executed." |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,36 +1,44 @@ | ||
name: Prettier | ||
|
||
on: | ||
push: | ||
workflow_run: | ||
workflows: | ||
- Test | ||
types: | ||
- completed | ||
|
||
jobs: | ||
run-prettier: | ||
runs-on: ubuntu-latest | ||
if: github.event.workflow_run.conclusion == 'success' | ||
permissions: | ||
contents: write | ||
steps: | ||
- name: Get yarn cache directory path | ||
id: yarn-cache-dir-path | ||
run: echo "::set-output name=dir::$(yarn config get cacheFolder)" | ||
- uses: actions/cache@v3 | ||
id: yarn-cache | ||
with: | ||
path: ${{ steps.yarn-cache-dir-path.outputs.dir }} | ||
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }} | ||
restore-keys: | | ||
${{ runner.os }}-yarn- | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
with: | ||
ref: ${{ github.event.pull_request.head.ref }} | ||
fetch-depth: 0 | ||
- name: Setup Node.js | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: 18 | ||
cache: yarn | ||
- name: Install Dependencies | ||
run: yarn install --immutable | ||
- name: Format the code | ||
run: yarn run fmt | ||
- name: auto commit | ||
uses: stefanzweifel/git-auto-commit-action@v4 | ||
with: | ||
commit_message: "[skip ci] auto-fixable format by github-actions" | ||
- name: Auto commit | ||
run: | | ||
git config user.name "${GITHUB_ACTOR}" | ||
git config user.email "${GITHUB_ACTOR}@users.noreply.github.com" | ||
if (git diff --shortstat | grep '[0-9]'); then \ | ||
git add .; \ | ||
git commit -m "chore: コードを整形"; \ | ||
git push origin HEAD:${GITHUB_REF}; \ | ||
fi | ||
run-prettier-check: | ||
if: ${{ ! failure() }} | ||
needs: run-prettier | ||
runs-on: ubuntu-latest | ||
steps: | ||
- run: echo "Format is successfully executed." |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,38 +1,39 @@ | ||
name: 'figma-tokens style-dictionary actions' | ||
name: figma-tokens style-dictionary actions | ||
|
||
on: | ||
pull_request: | ||
workflow_run: | ||
workflows: | ||
- Test | ||
types: | ||
- completed | ||
|
||
jobs: | ||
generate_json: | ||
name: generate_scss | ||
runs-on: ubuntu-latest | ||
# 'figma' という名前を含むブランチのみ動くように設定 | ||
if: contains(github.head_ref, 'figma') | ||
if: contains(github.head_ref, 'figma') && github.event.workflow_run.conclusion == 'success' | ||
permissions: | ||
contents: write | ||
steps: | ||
- name: Get yarn cache directory path | ||
id: yarn-cache-dir-path | ||
run: echo "::set-output name=dir::$(yarn config get cacheFolder)" | ||
- uses: actions/cache@v3 | ||
id: yarn-cache | ||
with: | ||
path: ${{ steps.yarn-cache-dir-path.outputs.dir }} | ||
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }} | ||
restore-keys: | | ||
${{ runner.os }}-yarn- | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
with: | ||
ref: ${{ github.event.pull_request.head.ref }} | ||
fetch-depth: 0 | ||
ref: ${{ github.event.workflow_run.head_sha }} | ||
- name: Setup Node.js | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: 18 | ||
cache: yarn | ||
- name: Install Dependencies | ||
run: yarn install --immutable | ||
- name: run style-dictionary | ||
run: yarn run gen:style | ||
- name: add and commit | ||
uses: stefanzweifel/git-auto-commit-action@v4 | ||
with: | ||
commit_message: "[skip ci] generate json by style-dictionary" | ||
- name: Auto commit | ||
run: | | ||
git config user.name "${GITHUB_ACTOR}" | ||
git config user.email "${GITHUB_ACTOR}@users.noreply.github.com" | ||
if (git diff --shortstat | grep '[0-9]'); then \ | ||
git add .; \ | ||
git commit -m "feat: design tokenから_variable.jsonの生成"; \ | ||
git push origin HEAD:${GITHUB_REF}; \ | ||
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters