Update docker/push/action.yaml

This commit is contained in:
Zakary Timson 2024-02-06 14:36:53 +00:00
parent 791287f79d
commit b26408c82a

View File

@ -35,12 +35,14 @@ runs:
using: composite
steps:
- name: Format Registry URL
run: echo "URL=$(echo ${{github.server_url}} | sed s%http://%% | sed s%https://%% )" >> $GITHUB_ENV
run: |
echo "URL=$(echo ${{github.server_url}} | sed s%http://%% | sed s%https://%% )" >> $GITHUB_ENV
echo "FROM=$(echo "${{inputs.from}}" | sed s%http://%% | sed s%https://%% )" >> $GITHUB_ENV
shell: sh
- name: Tag Image
run: |
[[ "${{inputs.from}}" != "false" ]] && docker tag "${{inputs.from}}" "${{env.URL}}/${{inputs.name}}:${{inputs.tag}}" || echo "Skipping tagging"
[[ "${{env.FROM}}" == "false" ]] && echo "Skipping..." || docker tag "${{env.FROM}}" "${{env.URL}}/${{inputs.name}}:${{inputs.tag}}"
shell: sh
- name: Docker Login