Skip to content

Commit

Permalink
Add exec_name to allow executing a binary with a different name as th…
Browse files Browse the repository at this point in the history
…e package
  • Loading branch information
alvarocabanas committed Jan 8, 2025
1 parent 03ee6e2 commit 6993f9e
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
5 changes: 5 additions & 0 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,10 @@ inputs:
platforms:
description: 'comma separated list of platforms with version we want to run test for'
required: true
exec_name:
description: 'name of the binary that should be executed after installation'
required: false
default: ''

runs:
using: "composite"
Expand All @@ -34,6 +38,7 @@ runs:
PACKAGE_NAME: ${{ inputs.package_name }}
PACKAGE_VERSION: ${{ inputs.package_version }}
GPG_KEY: ${{ inputs.gpg_key }}
EXEC_NAME: ${{ inputs.exec_name != '' && inputs.exec_name || inputs.package_name }}
run: "cd ${GITHUB_ACTION_PATH} && molecule converge"
- name: Teardown
shell: bash
Expand Down
3 changes: 2 additions & 1 deletion molecule/default/converge.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
package_version: "{{ lookup('env', 'PACKAGE_VERSION') }}"
package_name: "{{ lookup('env', 'PACKAGE_NAME') }}"
gpg_key: "{{ lookup('env', 'GPG_KEY') }}"
exec_name: "{{ lookup('env', 'EXEC_NAME') }}"

block:
- name: Repo setup
Expand All @@ -26,6 +27,6 @@
name: caos.ansible_roles.assert_version
vars:
target_versions:
- exec: "{{ package_name }} --version"
- exec: "{{ exec_name }} --version"
version: "{{ package_version }}"

0 comments on commit 6993f9e

Please sign in to comment.