Skip to content

Update plex.yml (#197) #190

Update plex.yml (#197)

Update plex.yml (#197) #190

name: create template-list.json
on:
workflow_dispatch:
push:
branches:
- main
paths:
- "templates/**"
pull_request:
types: [closed]
branches:
- main
paths:
- "templates/**"
jobs:
create-json:
if: github.event.pull_request.merged == 'true' || github.event_name == 'push'
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
token: ${{ secrets.API_KEY20220726 }}
- name: Create templates/template-file-list.json
run: |
cd templates
template_file_list=()
for f in *.yml; do
template_file_list+=("${f/.yml/}")
done
jq -n --arg v "${template_file_list[*]}" '{"templates": $v | split(" ")}' > template-file-list.json
- uses: stefanzweifel/git-auto-commit-action@v5
with:
commit_message: Automated Change template-file-list.json
file_pattern: templates/template-file-list.json
commit_user_name: My GitHub Actions Bot # defaults to "github-actions[bot]"
commit_user_email: [email protected] # defaults to "github-actions[bot]@users.noreply.github.com"
commit_author: Author <[email protected]> # defaults to author of the commit that triggered the run