diff --git a/.github/workflows/protect new wiki modules.yml b/.github/workflows/protect new wiki modules.yml deleted file mode 100644 index 6bb1caafa9a..00000000000 --- a/.github/workflows/protect new wiki modules.yml +++ /dev/null @@ -1,35 +0,0 @@ -name: Protect newly set up wiki - -on: - workflow_dispatch: - inputs: - wiki: - description: 'Wiki to set up' - required: true - -jobs: - protect: - if: github.ref_name == github.event.repository.default_branch - name: Protect modules on newly set up wiki - runs-on: ubuntu-latest - - steps: - - uses: actions/checkout@v6 - - - name: Setup Python - uses: actions/setup-python@v6 - with: - python-version: '3.14' - - - name: Install Python Dependency - run: pip install requests - - - name: Lua Protect - env: - WIKI_USER: ${{ secrets.LP_BOTUSER }} - WIKI_PASSWORD: ${{ secrets.LP_BOTPASSWORD }} - WIKI_UA_EMAIL: ${{ secrets.LP_UA_EMAIL }} - WIKI_BASE_URL: ${{ secrets.LP_BASE_URL }} - WIKI_TO_PROTECT: ${{ github.event.inputs.wiki }} - PYTHONUNBUFFERED: 1 - run: python3 ./scripts/protect.py diff --git a/.github/workflows/protect new wiki templates.yml b/.github/workflows/protect new wiki.yml similarity index 58% rename from .github/workflows/protect new wiki templates.yml rename to .github/workflows/protect new wiki.yml index 3b1542f5a2b..790e482f590 100644 --- a/.github/workflows/protect new wiki templates.yml +++ b/.github/workflows/protect new wiki.yml @@ -10,7 +10,7 @@ on: jobs: protect: if: github.ref_name == github.event.repository.default_branch - name: Protect modules on newly set up wiki + name: Protect modules and templates on newly set up wiki runs-on: ubuntu-latest steps: @@ -22,6 +22,7 @@ jobs: python-version: '3.14' - name: Install Python Dependency + id: dependencies run: pip install requests - name: Template Protect @@ -33,3 +34,15 @@ jobs: WIKI_TO_PROTECT: ${{ github.event.inputs.wiki }} PYTHONUNBUFFERED: 1 run: python3 ./scripts/protect_templates.py + + - name: Lua Protect + #if condition is needed this way to ensure it runs even if template protect fails + if: always() && steps.dependencies.outcome == 'success' + env: + WIKI_USER: ${{ secrets.LP_BOTUSER }} + WIKI_PASSWORD: ${{ secrets.LP_BOTPASSWORD }} + WIKI_UA_EMAIL: ${{ secrets.LP_UA_EMAIL }} + WIKI_BASE_URL: ${{ secrets.LP_BASE_URL }} + WIKI_TO_PROTECT: ${{ github.event.inputs.wiki }} + PYTHONUNBUFFERED: 1 + run: python3 ./scripts/protect.py