From fac4b2b20702e56569dad19eb0bb510408b34890 Mon Sep 17 00:00:00 2001 From: better0fdead Date: Wed, 17 Jul 2024 22:46:04 +0300 Subject: [PATCH] check-module-version: allow to change Tarantool version Added an option to change Tarantool version which is installed in action. Done that because some new rocks require Tarantool > 3.0 and it is impossible to use that action in those repositories. --- check-module-version/README.md | 7 ++++++- check-module-version/action.yml | 17 ++++++++++++++--- 2 files changed, 20 insertions(+), 4 deletions(-) diff --git a/check-module-version/README.md b/check-module-version/README.md index b591512..58e41bd 100644 --- a/check-module-version/README.md +++ b/check-module-version/README.md @@ -1,6 +1,6 @@ # GitHub Action: Check module version -This action checks the equality of the version from Lua +This action checks the equality of the version from Lua module's code and the repository tag that had triggered the workflow. This action is supposed to work on tag push event only. @@ -12,6 +12,8 @@ This action is supposed to work on tag push event only. Executed before extracting the version value from _VERSION variable. The hook code should not output to STDERR or STDOUT. - `rock-make-opts` — the rock make options. +- `tarantool-version` - version of tarantool to be used in action. + Default is `2.10`. ## Example workflow: @@ -34,6 +36,9 @@ jobs: version-pre-extraction-hook: '...' # Rock make options, e.g. STATIC_BUILD=ON. rock-make-opts: '...' + # Tarantool version to be used in action. + # Default is '2.10'. + tarantool-version: '3.1' package: runs-on: ... diff --git a/check-module-version/action.yml b/check-module-version/action.yml index 475e166..522043b 100644 --- a/check-module-version/action.yml +++ b/check-module-version/action.yml @@ -1,6 +1,6 @@ name: Check module version description: > - Сhecks the equality of the version from Lua + Checks the equality of the version from Lua module's code and the repository tag that had triggered the workflow. This action is supposed to work on tag push event only. @@ -16,6 +16,10 @@ inputs: description: Rock make options required: false default: '' + tarantool-version: + description: Tarantool version to be used in action + required: false + default: '2.10' runs: using: composite @@ -28,10 +32,17 @@ runs: - name: Setup tarantool uses: tarantool/setup-tarantool@v3 with: - tarantool-version: '2.10' + tarantool-version: ${{ inputs.tarantool-version }} + + - name: Setup tt + run: | + curl -L https://tarantool.io/XodVosJ/release/3/installer.sh | bash + sudo apt install -y tt + tt version + shell: bash - name: Make rock - run: tarantoolctl rocks ${{ inputs.rock-make-opts }} make + run: tt rocks ${{ inputs.rock-make-opts }} make shell: bash - name: Check package version