Tokens Studio Sync #18
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: Tokens Studio Sync | |
on: | |
workflow_dispatch: | |
inputs: | |
base_branch: | |
description: 'Choose the base branch for the sync pull request' | |
type: choice | |
options: | |
- 'main' | |
- 'prerelease/minor' | |
- 'prerelease/major' | |
token_type: | |
description: 'Choose which tokens to sync' | |
type: choice | |
options: | |
- 'all' | |
- 'base' | |
- 'brand' | |
- 'system' | |
default: 'all' | |
jobs: | |
sync_tokens: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 # Used for conventional commit ranges | |
- name: Install | |
shell: bash | |
run: yarn install | |
- name: Sync Tokens | |
shell: bash | |
run: yarn tokens-config sync ${{ inputs.token_type }} | |
env: | |
GITHUB_TOKEN: ${{ secrets.GH_RW_TOKEN }} | |
- name: Create Sync PR | |
shell: bash | |
run: yarn tokens-config create-pull ${{ inputs.base_branch }} | |
env: | |
GITHUB_TOKEN: ${{ secrets.GH_RW_TOKEN }} |