From f96460c077ba0a757a1fa642a5673d0a9c4a5f02 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Maximilian=20Ne=C3=9Flauer?= Date: Sat, 4 Jul 2026 19:51:37 +0200 Subject: [PATCH] Add validate.yml PR workflow for changed ckans - Mirror KSP-CKAN/KSP2-CKAN-meta's validate.yml: run the xKAN-meta_testing action (game KSA, source commits) on pushes to main and on PRs, with the download cache step. - Runs fail until KSA client support is merged into upstream KSP-CKAN/CKAN, because the action executes the upstream-built kspckan/metadata image, which rejects --game KSA until then. Closes #4 --- .github/workflows/validate.yml | 40 ++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100644 .github/workflows/validate.yml diff --git a/.github/workflows/validate.yml b/.github/workflows/validate.yml new file mode 100644 index 0000000..62c7efb --- /dev/null +++ b/.github/workflows/validate.yml @@ -0,0 +1,40 @@ +# Validate changed .ckan files with the CKAN metadata tester +name: Validate ckans +on: + push: + branches: + - main + pull_request: + types: + - opened + - synchronize + - reopened +jobs: + Validate: + runs-on: ubuntu-latest + steps: + - name: Get CKAN-meta repo + uses: actions/checkout@v6 + with: + ref: ${{ github.event.pull_request.head.sha }} + fetch-depth: 0 + - name: Cache downloads + if: ${{ github.event_name == 'pull_request' }} + uses: actions/cache@v5 + with: + path: .cache + key: downloads-${{ github.run_id }} + restore-keys: | + downloads- + - name: Test modified ckans + uses: KSP-CKAN/xKAN-meta_testing@master + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + PR_BASE_SHA: ${{ github.event.pull_request.base.sha }} + EVENT_BEFORE: ${{ github.event.before }} + with: + game: KSA + source: commits + pull request url: ${{ github.event.pull_request.url }} + - name: Chmod cached files so actions/cache can read them + run: sudo chmod -R a+r .cache