add error #63
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
on: | |
push: | |
branches: | |
- '*' | |
pull_request: | |
branches: | |
['main'] | |
env: | |
XML_SCHEMA: "plugins.xsd" | |
name: plugin-gallery | |
jobs: | |
plugin-gallery: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/setup-node@v4 | |
with: | |
node-version: 18 | |
- name: Install Dependencies | |
run: | | |
sudo apt-get update -qq | |
sudo apt-get install libxml2-utils | |
npm install -g pkp-plugin-cli | |
shell: bash | |
- name: Clone pkp plugin gallery | |
run: | | |
cd ~ | |
git clone -b main https://github.com/pkp/plugin-gallery --depth 50 | |
shell: bash | |
- name: Install for push | |
if: ${{ github.event_name == 'push'}} | |
run: | | |
cd ~/${{github.event.pull_request.head.repo.name || github.event.repository.name }} | |
git remote add user_repo https://github.com/${{ github.repository}} | |
git fetch user_repo | |
git checkout user_repo/${{ github.head_ref || github.ref_name }} | |
shell: bash | |
- name: Install for pull_request | |
if: ${{github.event_name == 'pull_request'}} | |
run: | | |
cd ~/${{github.event.pull_request.head.repo.name || github.event.repository.name }} | |
git remote add user_repo ${{ github.event.pull_request.head.repo.html_url}} | |
git fetch user_repo ${{ github.event.pull_request.head.ref}} | |
git checkout user_repo/${{ github.event.pull_request.head.ref}} | |
shell: bash | |
- name: "Run plugin validation" | |
run: | | |
cd ~/${{github.event.pull_request.head.repo.name || github.event.repository.name }} | |
xmllint --schema ./plugins.xsd ./plugins.xml --noout | |
shell: bash | |
- name: For push | |
if: ${{ github.event_name == 'push' && github.head_ref == 'main'}} | |
run: | | |
cd ~/${{github.event.pull_request.head.repo.name || github.event.repository.name }} | |
pkp-plugin validate-all-releases --input ./plugins.xml | |
shell: bash | |
- name: For pull request validate-new-release | |
if: ${{ github.event_name == 'pull_request'}} | |
run: | | |
cd ~/${{github.event.pull_request.head.repo.name || github.event.repository.name }} | |
git remote -v | |
git branch | |
pkp-plugin validate-new-release | |
shell: bash | |
- name: For push generate-site | |
if: ${{ github.event_name == 'push' && github.head_ref == 'main'}} | |
run: | | |
cd ~/${{github.event.pull_request.head.repo.name || github.event.repository.name }} | |
GITHUB_TOKEN=${{secrets.GITHUB_TOKEN}} pkp-plugin generate-site ./plugins.xml | |
shell: bash |