Merge pull request #335 from bluelovers/patch-3 #200
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build index | |
on: | |
workflow_dispatch: | |
push: | |
branches: | |
- extensions | |
paths: | |
- 'extensions/**.json' | |
- 'tags.json' | |
- 'index.json' | |
permissions: | |
contents: write | |
jobs: | |
build-index: | |
runs-on: ubuntu-latest | |
if: github.event.repository.fork == false | |
steps: | |
- name: Checkout extensions | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 2 | |
ref: 'extensions' | |
path: extensions | |
- name: Checkout master | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 2 | |
ref: 'master' | |
path: master | |
- name: Setup python | |
uses: actions/setup-python@v5 | |
with: | |
python-version: '3.11' | |
- name: Build index | |
run: python -B extensions/.github/scripts/build_index.py --build-branch extensions --deploy-branch master | |
- name: Get last commit message - extensions | |
id: last-commit-message-extensions | |
run: echo "msg=$(git -C extensions log -1 --pretty=%s)" >> $GITHUB_OUTPUT | |
- name: Get last commit message - master | |
id: last-commit-message-master | |
run: echo "msg=$(git -C master log -1 --pretty=%s)" >> $GITHUB_OUTPUT | |
- name: Commit - master | |
uses: stefanzweifel/git-auto-commit-action@v5 | |
with: | |
commit_message: ${{ steps.last-commit-message-master.outputs.msg }} | |
commit_options: '--amend --no-edit' | |
file_pattern: '*.json' | |
push_options: '--force' | |
skip_fetch: true | |
repository: master | |
- name: Commit - extensions | |
uses: stefanzweifel/git-auto-commit-action@v5 | |
with: | |
commit_message: ${{ steps.last-commit-message-extensions.outputs.msg }} | |
commit_options: '--amend --no-edit' | |
file_pattern: '*.json' | |
push_options: '--force' | |
skip_fetch: true | |
repository: extensions |