forked from TrueCloudLab/action-env
Use separate Makefile target for pushing to registry
Signed-off-by: Vitaliy Potyarkin <v.potyarkin@yadro.com>
This commit is contained in:
parent
976af216c6
commit
22d46bfb6f
2 changed files with 4 additions and 3 deletions
|
@ -34,7 +34,7 @@ jobs:
|
|||
if: steps.changed.outputs.any_changed == 'true'
|
||||
|
||||
- name: Push image to OCI registry
|
||||
run: make ${{matrix.tag}} PUSH=y
|
||||
run: make push-${{matrix.tag}}
|
||||
if: >-
|
||||
steps.changed.outputs.any_changed == 'true'
|
||||
&& github.ref == 'refs/heads/master'
|
||||
|
|
5
Makefile
5
Makefile
|
@ -13,8 +13,9 @@ $(TAGS):
|
|||
buildah images
|
||||
cd $@ && buildah bud --tag $(IMAGE):$@ .
|
||||
buildah images
|
||||
ifneq (,$(PUSH))
|
||||
|
||||
PUSH=$(foreach tag,$(TAGS),push-$(tag))
|
||||
$(PUSH):
|
||||
echo $$REGISTRY_PASSWORD | buildah login --username $(REGISTRY_USER) --password-stdin $(REGISTRY)
|
||||
buildah push --rm $(IMAGE):$@ docker://$(IMAGE):$@
|
||||
buildah logout
|
||||
endif
|
||||
|
|
Loading…
Add table
Reference in a new issue