Update icons #341
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: Update icons | |
on: | |
schedule: | |
- cron: "0 10 * * *" | |
jobs: | |
cron-update-icons: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Node | |
uses: ./.github/actions/node | |
- name: Today date | |
run: echo "TODAY=$(date '+%Y-%m-%d')" >> $GITHUB_ENV | |
- name: Setup git identity | |
run: | | |
git config --local user.email "[email protected]" | |
git config --local user.name "GitHub Action" | |
- name: Update icons | |
run: | | |
yarn components fetch:icons | |
git add --all | |
git diff-index --quiet HEAD || git commit -m "feat(icons): update icons from figma" | |
env: | |
FIGMA_TOKEN: ${{ secrets.FIGMA_TOKEN }} | |
- name: Create PR | |
uses: peter-evans/create-pull-request@v5 | |
with: | |
base: master | |
branch: feat/update-icons-and-svgs | |
token: ${{ secrets.PAT }} | |
delete-branch: true | |
title: "feat(icons): update icons from Figma" | |
labels: Icons | |
body: | | |
- Automatically generated PR on ${{ env.TODAY }}. | |
- Updates icons from Figma | |
assignees: mainframev | |
reviewers: mainframev | |
draft: false |