fix: accommodate for a situation where 'gitea.event.repository.name' is not set by act (GH sets it for a while now on schedule)
This commit is contained in:
parent
896d1528ae
commit
4383c34104
1 changed files with 9 additions and 2 deletions
11
action.yml
11
action.yml
|
@ -44,8 +44,15 @@ runs:
|
|||
id: get-role-info
|
||||
shell: bash
|
||||
run: |
|
||||
role_name=$(echo ${{ gitea.event.repository.name }} | sed 's/ansible-role-//g')
|
||||
echo "::set-output name=role_name::$role_name"
|
||||
echo "gitea.event.repository.name = ${{ gitea.event.repository.name }}"
|
||||
|
||||
if [ -n '${{ gitea.event.repository.name }}' ]; then
|
||||
ROLE_NAME=$(echo ${{ gitea.event.repository.name }} | sed 's/ansible-role-//g')
|
||||
else
|
||||
ROLE_NAME=$(echo "$GITHUB_REPOSITORY" | sed 's/.*\/ansible-role-//g')
|
||||
fi
|
||||
|
||||
echo "::set-output name=role_name::$ROLE_NAME"
|
||||
|
||||
CONFIG_FILE='/workspace/${{ gitea.repository }}/ansible.cfg'
|
||||
if [ -n '${{ inputs.config_file }}' ]; then
|
||||
|
|
Loading…
Add table
Reference in a new issue