Skip to content

Commit

Permalink
[Dev] Fix github action on updating material icons (#982)
Browse files Browse the repository at this point in the history
  • Loading branch information
huong-li-nguyen authored Feb 3, 2025
1 parent 41865a6 commit 3a7ff88
Showing 1 changed file with 14 additions and 2 deletions.
16 changes: 14 additions & 2 deletions .github/workflows/update-icons.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,22 +29,34 @@ jobs:
run: |
hatch run update-icons
- name: Check for changes
id: check_changes
run: |
git config user.email "[email protected]"
git config user.name "Vizro Team"
git diff --exit-code || echo "has_changes=true" >> $GITHUB_ENV
git diff --exit-code || echo "has_changes=true" >> $GITHUB_OUTPUT
outputs:
has_changes: ${{ steps.check_changes.outputs.has_changes }}

update-icons:
runs-on: ubuntu-latest
needs: [check-update]
if: |
env.has_changes == 'true'
needs.check-update.outputs.has_changes == 'true'
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: ${{ env.PYTHON_VERSION }}
- name: Install Hatch
run: pip install hatch
- name: Delete old branch if exists
run: |
git push origin --delete bot/update-material-icons || true
- name: Create and push changes
run: |
git config user.email "[email protected]"
git config user.name "Vizro Team"
git checkout -b bot/update-material-icons
hatch run changelog:add
git add -A
Expand Down

0 comments on commit 3a7ff88

Please sign in to comment.