mirror of
https://github.com/walkxcode/dashboard-icons.git
synced 2024-11-26 21:25:03 +01:00
40 lines
1.1 KiB
YAML
40 lines
1.1 KiB
YAML
name: Generate File Tree
|
|
|
|
on:
|
|
workflow_run:
|
|
workflows: ["Convert SVG Assets"]
|
|
branches:
|
|
- main
|
|
- dev
|
|
types:
|
|
- completed
|
|
|
|
jobs:
|
|
generate_file_tree:
|
|
if: ${{ github.event.workflow_run.conclusion == 'success' }}
|
|
runs-on: ubuntu-latest
|
|
permissions:
|
|
contents: write
|
|
|
|
steps:
|
|
- name: Checkout Repository
|
|
uses: actions/checkout@v3
|
|
with:
|
|
ref: ${{ github.event.workflow_run.head_branch }}
|
|
|
|
- name: Set Up Python
|
|
uses: actions/setup-python@v4
|
|
with:
|
|
python-version: "3.9"
|
|
|
|
- name: Generate File Tree
|
|
run: python scripts/generate_folder_tree.py svg png webp
|
|
|
|
- name: Commit and Push Changes
|
|
run: |
|
|
git config --global user.email "noreply@lammers.media"
|
|
git config --global user.name "Dashboard Icons Bot"
|
|
git add tree.json
|
|
git commit -m ":construction_worker: Generate file tree" || exit 0
|
|
git pull --rebase origin ${{ github.event.workflow_run.head_branch }}
|
|
git push origin HEAD:${{ github.event.workflow_run.head_branch }}
|