Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Script automation #26

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
46 changes: 46 additions & 0 deletions .github/workflows/fonts.yaml
Original file line number Diff line number Diff line change
@@ -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 "[email protected]"
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