Skip to content

auto generate design tokens from data.json #1678

auto generate design tokens from data.json

auto generate design tokens from data.json #1678

Workflow file for this run

name: auto generate design tokens from data.json
on:
workflow_run:
workflows:
- Test codes
types:
- completed
env:
workdir: client
jobs:
run-style-dictionary:
runs-on: ubuntu-latest
if: contains(github.head_ref, 'auto/design-tokens') && github.event.workflow_run.conclusion == 'success'
permissions:
contents: 'write'
defaults:
run:
working-directory: ${{ env.workdir }}
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Install Dependencies
run: yarn install --immutable
- name: Add style-dictionary
run: yarn add -D style-dictionary
- name: run style-dictionary
run: yarn style-dictionary build
- name: Auto commit
if: steps.changes.outputs.client == 'true'
run: |
git config --global user.name "${GITHUB_ACTOR}"
git config --global user.email "${GITHUB_ACTOR}@users.noreply.github.com"
if (git diff --shortstat | grep '[0-9]'); then \
git add .; \
git commit -m "feat(front): update design tokens"; \
git push origin HEAD:${GITHUB_REF}; \
fi