Skip to content

Commit

Permalink
update template
Browse files Browse the repository at this point in the history
  • Loading branch information
larsrickert committed Jul 23, 2024
1 parent f90e893 commit 36fc8d3
Show file tree
Hide file tree
Showing 3 changed files with 35 additions and 36 deletions.
27 changes: 27 additions & 0 deletions .github/templates/import-figma-variables/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: Reusable workflow for importing Figma variables
description: Imports Figma variables using our @sit-onyx/figma-utils CLI

inputs:
modes:
required: true
description: Modes to import
selector:
required: true
description: CSS selector for the resulting CSS file
output-directory:
required: true
description: Directory to write the output files to
format:
default: CSS
description: File formats to generate
file-prefix:
default: ""
description: File prefix

runs:
using: composite
steps:
- run: |
pnpm run @sit-onyx/figma-utils import-variables -k "${{ vars.FIGMA_FILE_KEY }}" -t "${{ secrets.FIGMA_TOKEN }}" -d "${{ inputs.output-directory }}" -m ${{ inputs.modes }} -f ${{ inputs.format }} -s "${{ inputs.selector }}" -n "${{ inputs.file-prefix }}"
shell: bash
working-directory: packages/figma-utils
16 changes: 8 additions & 8 deletions .github/workflows/import-figma.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,29 +33,29 @@ jobs:
format: CSS JSON
output-directory: "../sit-onyx/src/styles/themes"

- uses: ./.github/workflows/template-import-figma-variables.yml
name: Import additional onyx themes
- name: Import additional onyx themes
uses: ./.github/templates/import-figma-variables
with:
modes: lidl kaufland twogo
selector: ":where(:root), .onyx-theme-{mode}"
output-directory: "../sit-onyx/src/styles/themes"

- uses: ./.github/workflows/template-import-figma-variables.yml
name: Import light variables
- name: Import light variables
uses: ./.github/workflows/template-import-figma-variables.yml
with:
modes: light
selector: ":where(:root)"
output-directory: "../sit-onyx/src/styles"

- uses: ./.github/workflows/template-import-figma-variables.yml
name: Import light variables
- name: Import light variables
uses: ./.github/workflows/template-import-figma-variables.yml
with:
modes: dark
selector: ":where(.dark)"
output-directory: "../sit-onyx/src/styles"

- uses: ./.github/workflows/template-import-figma-variables.yml
name: Import density variables
- name: Import density variables
uses: ./.github/workflows/template-import-figma-variables.yml
with:
modes: compact default cozy
selector: ":where(.onyx-density-{mode})"
Expand Down
28 changes: 0 additions & 28 deletions .github/workflows/template-import-figma-variables.yml

This file was deleted.

0 comments on commit 36fc8d3

Please sign in to comment.