From ce613111f782e4af6623879783670c440a59cd59 Mon Sep 17 00:00:00 2001 From: Mikkeli Matlock Date: Thu, 11 Jun 2026 11:12:04 +0900 Subject: [PATCH] refactor: replace inline publish job with thin caller Workflow logic now lives in novoyuuparosk-auto-wiki/publish-songs.yml (reusable, workflow_call). Gains incremental publishing: only changed song files are republished instead of --all on every push. --- .gitea/workflows/publish.yml | 35 +++++++---------------------------- 1 file changed, 7 insertions(+), 28 deletions(-) diff --git a/.gitea/workflows/publish.yml b/.gitea/workflows/publish.yml index 59b644a..8e84a35 100644 --- a/.gitea/workflows/publish.yml +++ b/.gitea/workflows/publish.yml @@ -10,31 +10,10 @@ on: jobs: publish: - runs-on: ubuntu-latest - container: - image: pi5-16.local:3005/mikkeli/novoyuuparosk-wiki-runner:v0 - - steps: - - name: Checkout ncmr-songs - env: - FAPAT: ${{ secrets.FAPAT }} - URL_TO_GITEA: ${{ vars.URL_TO_GITEA }} - run: | - git clone "http://mikkeli:${FAPAT}@${URL_TO_GITEA#http://}/mikkeli/ncmr-songs" ncmr-songs - git -C ncmr-songs checkout ${{ github.sha }} - - - name: Checkout auto-wiki (renderer) - env: - FAPAT: ${{ secrets.FAPAT }} - URL_TO_GITEA: ${{ vars.URL_TO_GITEA }} - run: git clone "http://mikkeli:${FAPAT}@${URL_TO_GITEA#http://}/mikkeli/novoyuuparosk-auto-wiki" auto-wiki - - - name: Publish - env: - WIKI_API_URL: ${{ vars.WIKI_API_URL }} - WIKI_BASE_URL: ${{ vars.WIKI_BASE_URL }} - WIKI_BOT_USER: ${{ secrets.WIKI_BOT_USER }} - WIKI_BOT_PASSWORD: ${{ secrets.WIKI_BOT_PASSWORD }} - SOURCE_REF: ${{ github.sha }} - GITEA_REPO_URL: ${{ vars.URL_TO_GITEA }}/mikkeli/ncmr-songs - run: python auto-wiki/pipelines/songs/publish.py --source-dir ncmr-songs --all + uses: mikkeli/novoyuuparosk-auto-wiki/.gitea/workflows/publish-songs.yml@master + with: + SOURCE_REF: ${{ github.sha }} + # Empty on workflow_dispatch — the reusable workflow treats that as + # "publish everything", same as a first push. + SOURCE_BASE_REF: ${{ github.event.before }} + secrets: inherit