Import design tokens #62
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
name: Import design tokens | |
on: | |
workflow_dispatch: | |
inputs: | |
ref: | |
description: 'mistica-design repo changeset or branch' | |
required: false | |
default: 'production' | |
draft: | |
type: boolean | |
description: 'Create a draft PR' | |
required: false | |
default: false | |
jobs: | |
import-design-tokens: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Checkout mistica-design repo with the tokens | |
uses: actions/checkout@v4 | |
with: | |
repository: Telefonica/mistica-design | |
path: '.github/mistica-design' | |
ref: ${{github.event.inputs.ref}} | |
token: ${{ secrets.FLOW_GITHUB_TOKEN }} | |
- name: Install dependencies | |
env: | |
PUPPETEER_SKIP_CHROMIUM_DOWNLOAD: 'true' | |
run: yarn install --immutable --immutable-cache | |
- name: Generate skins from design tokens | |
run: cd packages/generate-design-tokens && yarn && node index.js | |
- name: Prettier | |
run: yarn prettier src/skins --write | |
- name: Create Pull Request | |
uses: peter-evans/create-pull-request@v5 | |
with: | |
token: ${{ secrets.FLOW_GITHUB_TOKEN }} | |
add-paths: 'src/skins' | |
commit-message: 'feat(skin): update design tokens' | |
title: 'feat(skin): update design tokens' | |
branch: 'import-design-tokens-${{github.event.inputs.ref}}' | |
reviewers: 'atabel,pladaria' | |
delete-branch: true | |
draft: ${{github.event.inputs.draft}} |