Skip to content

PR-icon-updates

PR-icon-updates #6

name: 'PR-icon-updates'
on:
push:
branches: [ "chore-updated-icons" ]
workflow_dispatch:
concurrency:
group: ${{ github.head_ref || github.run_id }}
cancel-in-progress: true
env:
GH_TOKEN: ${{ github.token }}
FOLDER: 'src'
jobs:
pr-icon-updates:
runs-on: ubuntu-latest
defaults:
run:
working-directory: packages/components/icons
steps:
- uses: actions/checkout@v3
with:
ref: chore-updated-icons
fetch-depth: 0
- run: gh pr create --title "chore(icons)(:) icons updated" --body "Check Spark Tokens for a full changelog." --reviewer adevinta/spark-dev
continue-on-error: true
- name: Install
uses: ./.github/composite-actions/install
- name: Generate Icons
run: npm run generate
- name: Commit and Push Changes
run: |
if ! git diff --quiet --exit-code -- "$FOLDER" ;
then
git config user.name 'spark-ui-bot'
git config user.email '[email protected]'
git add "$FOLDER"
git commit -m "chore(icons): generate icons in $FOLDER"
git show
git push
echo "::notice::UPDATED"
else
echo "::notice::UP-TO-DATE"
fi