Skip to content

Commit

Permalink
Update action.yaml
Browse files Browse the repository at this point in the history
  • Loading branch information
helderbetiol committed Jan 10, 2024
1 parent 61cc357 commit c2918fd
Showing 1 changed file with 14 additions and 3 deletions.
17 changes: 14 additions & 3 deletions .github/actions/build/docker/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ inputs:
required: true
DOCKERFILE:
description: "Name of Dockerfile, can include path"
default: "./Dockerfile"
default: ""
VERSION:
description: "Version given to docker image"
required: true
Expand Down Expand Up @@ -40,11 +40,22 @@ runs:
username: ${{ inputs.TEAM_USERNAME }}
password: ${{ inputs.TEAM_PASSWORD }}

- name: πŸ‹πŸ—οΈ Build & Tag Docker images
if: ${{ !contains('dependabot', github.ref) }}
- name: πŸ‹πŸ—οΈ Build Docker images
if: ${{ inputs.DOCKERFILE == '' }}
shell: bash
run: |
docker build -t ${{ inputs.IMAGE_NAME }}:latest ${{ inputs.FOLDER_NAME }}
- name: πŸ‹πŸ—οΈ Build Docker images with custom context
if: ${{ inputs.DOCKERFILE != '' }}
shell: bash
run: |
docker build -t ${{ inputs.IMAGE_NAME }}:latest -f ${{ inputs.DOCKERFILE }} ${{ inputs.FOLDER_NAME }}
- name: πŸ‹πŸ—οΈ Tag Docker images
if: ${{ !contains('dependabot', github.ref) }}
shell: bash
run: |
docker tag ${{ inputs.IMAGE_NAME }}:latest ${{ inputs.TEAM_DOCKER_URL }}/${{ inputs.IMAGE_NAME }}:latest
docker tag ${{ inputs.IMAGE_NAME }}:latest ${{ inputs.TEAM_DOCKER_URL }}/${{ inputs.IMAGE_NAME }}:${{ inputs.VERSION }}
Expand Down

0 comments on commit c2918fd

Please sign in to comment.