This commit is contained in:
Bertrand Lanson 2023-03-09 13:44:01 +01:00
parent 625c9e4f98
commit d4c725d736
2 changed files with 4 additions and 5 deletions

View File

@ -12,4 +12,4 @@ runs:
using: docker
image: Dockerfile
env:
GALAXY_API_KEY: ${{ inputs.galaxy-api-key }}
GALAXY_API_TOKEN: ${{ inputs.galaxy-api-key }}

View File

@ -4,11 +4,10 @@ command_string="ansible-galaxy role import"
echo "Github repo owner: ${GITHUB_REPOSITORY_OWNER}"
echo "Github repo name: ${GITHUB_REPOSITORY}"
echo "galaxy_api_key: ${GALAXY_API_KEY}"
echo "input_galaxy-api-key ${INPUT_GALAXY-API-KEY}"
echo "galaxy_api_key: ${GALAXY_API_TOKEN}"
if [ -n "${INPUT_GALAXY-API-KEY}" ]; then
command_string="$command_string --api-key ${INPUT_GALAXY-API-KEY} ${GITHUB_REPOSITORY_OWNER} ${GITHUB_REPOSITORY}"
if [ -n "${GALAXY_API_TOKEN}" ]; then
command_string="$command_string --api-key ${GALAXY_API_TOKEN} ${GITHUB_REPOSITORY%/*} ${GITHUB_REPOSITORY#*/}"
fi
echo "Command: $command_string"