feat(workflow): Multiple fixes in one (#160)
* fix(workflow): Re-organized the workflow, put the scripts in their own scripts folder * fix(workflow): Fixed so that we have a default SELECT selection in the issue templates * fix(workflow): Added a way to run the issue workflows manually as well * feat(workflow): Added workflow for closing issues with no selected plugin * fix(workflow): Changed so that we only use one file for jobs that only care about the plugin folders * fix(workflows): resolve repository root after script move --------- Co-authored-by: Lemmy <studio@quadbyte.net>
This commit is contained in:
co-authored by
Lemmy
parent
68d904fcea
commit
9b2179899b
@@ -0,0 +1,88 @@
|
||||
name: Jobs to run on push to main
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
paths-ignore:
|
||||
- catalog.toml
|
||||
- '.**'
|
||||
- README.md
|
||||
- README_TEMPLATE.md
|
||||
workflow_dispatch:
|
||||
|
||||
concurrency:
|
||||
group: on-push-${{ github.ref }}
|
||||
cancel-in-progress: true
|
||||
|
||||
jobs:
|
||||
update-catalog:
|
||||
runs-on: ubuntu-latest
|
||||
permissions:
|
||||
contents: write
|
||||
if: ${{ github.repository == 'noctalia-dev/community-plugins' }}
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v7
|
||||
with:
|
||||
fetch-depth: 0
|
||||
token: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
- name: Rebuild catalog
|
||||
run: python3 .github/workflows/scripts/update-catalog.py
|
||||
|
||||
- name: Check for changes
|
||||
id: check_changes
|
||||
run: |
|
||||
git add catalog.toml
|
||||
if git diff --cached --quiet catalog.toml; then
|
||||
echo "changed=false" >> "$GITHUB_OUTPUT"
|
||||
echo "No changes to catalog.toml"
|
||||
else
|
||||
echo "changed=true" >> "$GITHUB_OUTPUT"
|
||||
echo "Changes detected in catalog.toml"
|
||||
fi
|
||||
|
||||
- name: Commit and push changes
|
||||
if: steps.check_changes.outputs.changed == 'true'
|
||||
run: |
|
||||
git config --local user.email "github-actions[bot]@users.noreply.github.com"
|
||||
git config --local user.name "github-actions[bot]"
|
||||
git commit -m "chore: update plugin catalog [skip ci]"
|
||||
git push
|
||||
|
||||
update-issue-templates:
|
||||
runs-on: ubuntu-latest
|
||||
permissions:
|
||||
contents: write
|
||||
if: ${{ github.repository == 'noctalia-dev/community-plugins' }}
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v7
|
||||
with:
|
||||
fetch-depth: 0
|
||||
token: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
- name: Update Issue Templates
|
||||
run: python3 .github/workflows/scripts/update-issue-templates.py
|
||||
|
||||
- name: Check for changes
|
||||
id: check_changes
|
||||
run: |
|
||||
git add .github/ISSUE_TEMPLATE/bug_report.yml .github/ISSUE_TEMPLATE/feature_request.yml
|
||||
if git diff --quiet --cached -- .github/ISSUE_TEMPLATE/bug_report.yml && git diff --quiet --cached -- .github/ISSUE_TEMPLATE/feature_request.yml; then
|
||||
echo "changed=false" >> "$GITHUB_OUTPUT"
|
||||
echo "No changes found in the issue templates!"
|
||||
else
|
||||
echo "changed=true" >> "$GITHUB_OUTPUT"
|
||||
echo "Changes detected in the issue templates!"
|
||||
fi
|
||||
|
||||
- name: Commit and push changes
|
||||
if: steps.check_changes.outputs.changed == 'true'
|
||||
run: |
|
||||
git config --local user.email "github-actions[bot]@users.noreply.github.com"
|
||||
git config --local user.name "github-actions[bot]"
|
||||
git commit -m "chore: update issue templates [skip ci]"
|
||||
git push
|
||||
|
||||
Reference in New Issue
Block a user