Skip to content

Instantly share code, notes, and snippets.

@diego3g
Created September 15, 2022 13:27
Show Gist options
  • Save diego3g/015f3a286eca02f284c9095bfa0c2e4a to your computer and use it in GitHub Desktop.
Save diego3g/015f3a286eca02f284c9095bfa0c2e4a to your computer and use it in GitHub Desktop.
name: Generate design tokens
on:
repository_dispatch:
types: update-tokens
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Create input JSON
id: create-json
uses: jsdaniell/create-json@1.1.2
with:
name: ${{ github.event.client_payload.filename }}
json: ${{ github.event.client_payload.tokens }}
dir: 'input'
- name: Install Node.js
uses: actions/setup-node@v3
with:
node-version: 16
- name: Install dependencies
run: npm ci
- name: Build
run: npm run build
- name: Create PR
uses: peter-evans/create-pull-request@v4
with:
commit-message: "style: Update design tokens"
title: ${{ github.event.client_payload.commitMessage || 'Update design tokens' }}
body: "Design tokens have been updated via Figma and need to be reviewed."
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
BRANCH_NAME: 'main'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment