diff --git a/docker/action.yaml b/docker/action.yaml index 7d8494b..c47f2f4 100644 --- a/docker/action.yaml +++ b/docker/action.yaml @@ -14,10 +14,14 @@ runs: steps: - shell: bash run: | - docker login --username acti-bot --password ${ACTI_BOT_TOKEN} ${{ gitea.server_url }} + repo_url="${{ gitea.repositoryUrl }}" + repo_host="${repo_url#https://}" + repo_host="${repo_host%%/*}" + docker login --username acti-bot --password ${ACTI_BOT_TOKEN} ${repo_host} while IFS= read -r tag; do [[ -z "$tag" ]] && continue - docker build -f Containerfile -t "${{ gitea.server_url }}/${{ gitea.repository }}/${{ inputs.name }}:$tag" - docker push "${{ gitea.server_url }}/${{ gitea.repository }}/${{ inputs.name }}:$tag" + image="${repo_host}/${{ gitea.repository }}/${{ inputs.name }}:$tag" + docker build -f Containerfile -t $image + docker push $image done <<< "${{ inputs.tags }}"