-
Notifications
You must be signed in to change notification settings - Fork 150
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Dev] Fix github action on updating material icons (#982)
- Loading branch information
1 parent
41865a6
commit 3a7ff88
Showing
1 changed file
with
14 additions
and
2 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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 | ||
|