Update docker/build/action.yaml

This commit is contained in:
Zakary Timson 2023-11-24 21:51:48 +00:00
parent e11c2f61ca
commit 19c6c7edc1

View File

@ -25,8 +25,15 @@ runs:
- name: Creat Image Tag - name: Creat Image Tag
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
shell: sh shell: sh
- name: Docker Build - name: Docker Build
uses: docker://docker uses: docker://docker
with: with:
entrypoint: docker entrypoint: docker
args: build -t "${{env.URL}}/${{inputs.name}}:${{inputs.tag}}" -f ${{inputs.dockerfile}} . args: build -t "${{env.URL}}/${{inputs.name}}:${{inputs.tag}}" -f ${{inputs.dockerfile}} .
- name: Tag as Latest
if: ${{inputs.tag}} != latest && ${{github.ref_name}} == (git symbolic-ref refs/remotes/origin/HEAD --short | cut -c 7)
with:
entrypoint: docker
args: tag "${{env.URL}}/${{inputs.name}}:${{inputs.tag}}" "${{env.URL}}/${{inputs.name}}:latest"