From e2396d2a27af39927bb8aa8d1b265c84f16bbcc7 Mon Sep 17 00:00:00 2001 From: Alexander Wilms Date: Mon, 22 Jul 2024 05:04:07 +0200 Subject: [PATCH] CI: Use URL relative to repo's owner for test data This allows to easily run tests in forks --- .github/workflows/github.yml | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/.github/workflows/github.yml b/.github/workflows/github.yml index cd8498c2e..7d3b02406 100644 --- a/.github/workflows/github.yml +++ b/.github/workflows/github.yml @@ -146,7 +146,13 @@ jobs: HEROES_3_DATA_PASSWORD: ${{ secrets.HEROES_3_DATA_PASSWORD }} if: ${{ env.HEROES_3_DATA_PASSWORD != '' && matrix.test == 1 }} run: | - wget --progress=dot:giga https://github.com/vcmi-mods/vcmi-test-data/releases/download/v1.0/h3_assets.zip + if [[ ${{github.repository_owner}} == vcmi ]] + then + data_url="https://github.com/vcmi-mods/vcmi-test-data/releases/download/v1.0/h3_assets.zip" + else + data_url="https://github.com/${{github.repository_owner}}/vcmi-test-data/releases/download/v1.0/h3_assets.zip" + fi + wget --progress=dot:giga "$data_url" -O h3_assets.zip 7za x h3_assets.zip -p$HEROES_3_DATA_PASSWORD mkdir -p ~/.local/share/vcmi/ mv h3_assets/* ~/.local/share/vcmi/