Skip to content

Merge pull request #198 from Inzaniak/extensions #78

Merge pull request #198 from Inzaniak/extensions

Merge pull request #198 from Inzaniak/extensions #78

Workflow file for this run

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@v3
with:
fetch-depth: 2
ref: 'extensions'
path: extensions
- name: Checkout master
uses: actions/checkout@v3
with:
fetch-depth: 2
ref: 'master'
path: master
- name: Setup python
uses: actions/setup-python@v4
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@v4
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@v4
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