Setup Github Actions

This commit is contained in:
Johan van Eck 2025-07-27 16:59:15 +03:00
parent 95951f96af
commit ad0d2544bc
4 changed files with 36 additions and 60 deletions

View file

@ -1,32 +0,0 @@
name: Bundle Data
on:
push:
branches:
- stable
jobs:
bundle:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: "3.x"
- name: Install dependencies
run: |
python -m pip install pyyaml
- name: Run bundling script
run: python scripts/bundle.py
- name: Commit changes
run: |
git config --local user.email "action@github.com"
git config --local user.name "GitHub Action"
git add bundles/
git commit -m "Update bundles" || echo "No changes to commit"
git push
- name: Trigger Website Build
uses: peter-evans/repository-dispatch@v3
with:
token: ${{ secrets.WORKFLOW_AUTOMATION_TOKEN }}
repository: Dictionarry-Hub/website
event-type: database-updated

36
.github/workflows/generate.yml vendored Normal file
View file

@ -0,0 +1,36 @@
name: Generate
on:
workflow_dispatch: # Manually trigger
jobs:
generate:
runs-on: ubuntu-latest
steps:
- name: Checkout this repository
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.13.5"
- name: Install dependencies
run: pip install uv
- name: Clone secondary repository
run: |
git config --global user.email "action@github.com"
git config --global user.name "Github Actions"
git clone https://github.com/TRaSH-Guides/Guides.git TRaSH-Guides
- name: Run Python script
run: |
uv run scripts/generate.py TRaSH-Guides/docs/json .
- name: Check for changes
run: |
git add regex_patterns/ custom_formats/ profiles/
git commit -m "Automated update from GitHub Actions" || echo "No changes to commit"
git push

View file

@ -1,18 +0,0 @@
name: Notify Groups
on:
push:
branches:
- 1080p-Encode
jobs:
notify:
runs-on: ubuntu-latest
steps:
- name: Repository Dispatch
uses: peter-evans/repository-dispatch@v3
with:
token: ${{ secrets.WORKFLOW_AUTOMATION_TOKEN }}
repository: Dictionarry-Hub/groups
event-type: database-updated
client-payload: '{"ref": "${{ github.ref }}", "sha": "${{ github.sha }}"}'

View file

@ -1,10 +0,0 @@
name: Notify
on:
push:
branches:
- "stable"
jobs:
call-notify-commit:
uses: Dictionarry-Hub/parrot/.github/workflows/notify-commit.yml@v1
secrets:
PARROT_URL: ${{ secrets.PARROT_URL }}