ci: Push directly from build step
Refactor the workflows so that we can use build-push-action also for publishing. This is a precondition for switching to buildx, needed for multi-arch images. The trick needed for this is using an environment variable to control whether we should push when building the master branch, initializing it according to the tag status. Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
This commit is contained in:
15
.github/workflows/next.yml
vendored
15
.github/workflows/next.yml
vendored
@@ -57,17 +57,12 @@ jobs:
|
||||
- name: Build kas image
|
||||
uses: docker/build-push-action@v2
|
||||
with:
|
||||
tags: |
|
||||
ghcr.io/siemens/kas/kas
|
||||
ghcr.io/siemens/kas/kas:next
|
||||
push: true
|
||||
tags: ghcr.io/siemens/kas/kas:next
|
||||
- name: Build kas-isar image
|
||||
uses: docker/build-push-action@v2
|
||||
with:
|
||||
file: Dockerfile.isar
|
||||
tags: |
|
||||
ghcr.io/siemens/kas/kas-isar
|
||||
ghcr.io/siemens/kas/kas-isar:next
|
||||
- name: Push images
|
||||
run: |
|
||||
docker push ghcr.io/siemens/kas/kas:next
|
||||
docker push ghcr.io/siemens/kas/kas-isar:next
|
||||
build-args: KAS_TAG=next
|
||||
push: true
|
||||
tags: ghcr.io/siemens/kas/kas-isar:next
|
||||
|
Reference in New Issue
Block a user