diff --git a/.gitea/actions/action.yaml b/.gitea/actions/action.yaml new file mode 100644 index 0000000..0db885b --- /dev/null +++ b/.gitea/actions/action.yaml @@ -0,0 +1,35 @@ +name: 'Install BaseX' +description: 'Install BaseX on a GitHub Actions runner, assumes Java already installed' +inputs: + basex-version: + description: 'The version of BaseX to install (e.g., 11.7)' + required: true + default: '11.7' +runs: + using: 'composite' + steps: + - name: Download BaseX + shell: bash + run: | + BASEX_VERSION="${{ inputs.basex-version }}" + BASEX_CLEAN_VERSION="${BASEX_VERSION//./}" + wget https://files.basex.org/releases/$BASEX_VERSION/BaseX$BASEX_CLEAN_VERSION.zip -O BaseX.zip + + - name: Unzip BaseX + shell: bash + run: | + unzip BaseX.zip -d $HOME + echo "rm" + rm BaseX.zip + echo "done" + + - name: Add BaseX to PATH + shell: bash + run: | + echo "BASEX_ROOT=$HOME/basex" >> $GITHUB_ENV + echo "PATH=$PATH:$HOME/basex/bin" >> $GITHUB_ENV + + - name: Verify BaseX installation + shell: bash + run: | + basex declare option output:indent 'yes';db:system() \ No newline at end of file diff --git a/.gitea/workflows/test-basex.yaml b/.gitea/workflows/test-basex.yaml index 0acba76..76c805e 100644 --- a/.gitea/workflows/test-basex.yaml +++ b/.gitea/workflows/test-basex.yaml @@ -24,7 +24,7 @@ jobs: java-version: "17" - name: Install BaseX - uses: ./.github/actions/install-basex + uses: .github/actions/install-basex with: basex-version: '11.7' # Specify the BaseX version here diff --git a/.gitea/workflows/trigger/base-act b/.gitea/workflows/trigger/base-act index 7ec9a4b..eca9dbe 100644 --- a/.gitea/workflows/trigger/base-act +++ b/.gitea/workflows/trigger/base-act @@ -1 +1 @@ -aa \ No newline at end of file +aab \ No newline at end of file