Skip to content

[Theme]: cyber

[Theme]: cyber #48

Workflow file for this run

name: approve theme
on:
issues:
types:
- labeled
permissions: write-all
jobs:
approve:
if: github.event.label.name == 'approved'
runs-on: ubuntu-latest
defaults:
run:
shell: bash
steps:
- name: Install Python
uses: actions/setup-python@v4
with:
python-version: '3.10'
- name: Parse issue
id: parse
uses: onmax/[email protected]
with:
issue_number: ${{ github.event.issue.number }}
- uses: actions/checkout@v2
with:
submodules: true
- name: Update themes.json
run: |
ls
echo "`jq '.themes+=[{"name":"${{ fromJson(steps.parse.outputs.payload).Name }}","repo":"${{ fromJson(steps.parse.outputs.payload).Repo }}","branch":"${{ fromJson(steps.parse.outputs.payload).Branch }}","config":"${{ fromJson(steps.parse.outputs.payload).Config }}","desc":"${{ fromJson(steps.parse.outputs.payload).Description }}"}]' themes.json`" > themes.json
- name: add submodule
run: |
git submodule add -b '${{ fromJson(steps.parse.outputs.payload).Branch }}' -- '${{ fromJson(steps.parse.outputs.payload).Repo }}' 'themes/${{ fromJson(steps.parse.outputs.payload).Name }}'
- name: add to list
run: |
python update_readme.py
- name: commit
run: |
git config user.email "[email protected]"
git config user.name "GitHub Actions - add theme"
git add --all
git commit -m "Add theme" || echo "No changes to commit"
git push
- name: Close Issue
uses: peter-evans/close-issue@v2
with:
comment: |
theme request approved, submmodule added
labels: |
approved
theme
deny:
if: github.event.label.name == 'denied'
runs-on: ubuntu-latest
steps:
- name: Close Issue
uses: peter-evans/close-issue@v2
with:
issue-number: ${{ github.event.issue.number }}
comment: |
theme request denied
labels: |
denied
theme