Skip to content

Commit 473b5d1

Browse files
committed
Use build args input instead of creating dev image
1 parent 11ee00b commit 473b5d1

File tree

1 file changed

+6
-21
lines changed

1 file changed

+6
-21
lines changed

action.yml

Lines changed: 6 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -8,19 +8,20 @@ inputs:
88
user:
99
description: "Registry's user"
1010
required: true
11+
default: ${{ github.actor }}
1112
password:
1213
description: "Registry user's password or token"
1314
required: true
15+
default: ${{ secrets.GITHUB_TOKEN }}
1416
image:
1517
description: "Docker image name without tag"
1618
required: true
1719
tag:
1820
description: "Docker image tag"
1921
required: true
20-
build_dev:
21-
description: 'Creates a -dev image too if set to true (default: "false")'
22-
required: true
23-
default: "false"
22+
build_args:
23+
description: "Environment variables passed to docker build"
24+
required: false
2425

2526
runs:
2627
using: "composite"
@@ -41,29 +42,13 @@ runs:
4142
with:
4243
images: ${{ inputs.image }}
4344

44-
- name: Build and push -dev image
45-
if: ${{ inputs.build_dev }} == "true"
46-
uses: docker/[email protected]
47-
with:
48-
context: ${{ github.workspace }}
49-
platforms: linux/amd64
50-
push: true
51-
build-args: |
52-
DEV=yes
53-
tags: |
54-
${{ inputs.image }}:${{ inputs.tag }}-dev
55-
labels: ${{ steps.meta.outputs.labels }}
56-
cache-from: type=gha
57-
cache-to: type=gha,mode=max
58-
5945
- name: Build and push prod image
6046
uses: docker/[email protected]
6147
with:
6248
context: ${{ github.workspace }}
6349
platforms: linux/amd64
6450
push: true
65-
build-args: |
66-
DEV=no
51+
build-args: ${{ inputs.build_args }}
6752
tags: |
6853
${{ inputs.image }}:${{ inputs.tag }}
6954
labels: ${{ steps.meta.outputs.labels }}

0 commit comments

Comments
 (0)