diff --git a/.github/workflows/fonts.yaml b/.github/workflows/fonts.yaml new file mode 100644 index 0000000..37051c2 --- /dev/null +++ b/.github/workflows/fonts.yaml @@ -0,0 +1,46 @@ +name: Generate Icons and Create PR + +on: + workflow_dispatch: + push: + branches: + - main + - script-automation + +env: + CARGO_TERM_COLOR: always + +jobs: + generate-and-pr: + runs-on: ubuntu-latest + + steps: + - name: Check out the repository + uses: actions/checkout@v4 + + - name: Chec directory + run: ls -la + + - name: Install python requirements + run: pip install requests + + - name: Run the script + run: python scripts/update.py + + - name: Check for changes + id: git_diff + run: | + git config --global user.email "action@github.com" + git config --global user.name "GitHub Action" + git diff --exit-code || echo "Changes detected" + + - name: Create Pull Request + if: steps.git_diff.outputs.exit-code != '0' # Only proceed if changes were detected + uses: peter-evans/create-pull-request@v6 + with: + title: "Update icons" + body: "This PR updates the icons generated by the script." + commit-message: "Update icons" + branch: "update-icons" + signoff: true + delete-branch: true