Design Tokens Updater #756
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: Design Tokens Updater | |
on: | |
schedule: | |
- cron: '0 4 * * 1-5' # every work-day at 6:00am in +02:00 | |
workflow_dispatch: | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
lfs: 'true' | |
- name: set up JDK 18 | |
uses: actions/setup-java@v4 | |
with: | |
distribution: 'zulu' | |
java-version: 18 | |
- name: Install pngquant | |
run: sudo apt-get install -y pngquant | |
- name: Today env | |
run: echo "TODAY=$(date '+%Y-%m-%d')" >> $GITHUB_ENV | |
- name: Update Tokens | |
run: bash .github/tokens-updater.sh | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
FIGMA_TOKEN: ${{ secrets.FIGMA_TOKEN }} | |
- uses: tibdex/github-app-token@v2 | |
id: generate-token | |
with: | |
app_id: ${{ secrets.PRBOT_APP_ID }} | |
private_key: ${{ secrets.PRBOT_PRIVATE_KEY }} | |
- name: Create Pull Request | |
uses: peter-evans/create-pull-request@v6 | |
with: | |
token: ${{ steps.generate-token.outputs.token }} | |
labels: | | |
feature | |
design-tokens-autoupdate | |
title: Design Tokens Update on ${{ env.TODAY }} | |
body: "" | |
base: main | |
branch: tokens-autoupdate |