tuleeko kontti?
This commit is contained in:
@@ -62,14 +62,27 @@ jobs:
|
||||
needs: [check, quality-gate]
|
||||
if: needs.check.outputs.artifact_exists == 'false'
|
||||
runs-on: ubuntu-latest
|
||||
services:
|
||||
docker:
|
||||
image: docker:dind
|
||||
env:
|
||||
DOCKER_TLS_CERTDIR: ""
|
||||
env:
|
||||
DOCKER_HOST: tcp://docker:2375
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- name: Build container
|
||||
run: |
|
||||
docker build -t "minimal:${{ needs.check.outputs.version }}" .
|
||||
VERSION="${{ needs.check.outputs.version }}"
|
||||
NOW=$(date -u +%Y-%m-%dT%H:%M:%SZ)
|
||||
docker build \
|
||||
--label "git.commit=${GITHUB_SHA:0:8}" \
|
||||
--label "git.commitBy=${GITHUB_ACTOR}" \
|
||||
--label "build.date=${NOW}" \
|
||||
-t "minimal:${VERSION}" .
|
||||
mkdir -p /tmp/image
|
||||
docker save "minimal:${{ needs.check.outputs.version }}" -o /tmp/image/artifact.tar
|
||||
docker save "minimal:${VERSION}" -o /tmp/image/artifact.tar
|
||||
|
||||
- name: Save Docker image for next job
|
||||
uses: actions/upload-artifact@v4
|
||||
@@ -80,6 +93,13 @@ jobs:
|
||||
push:
|
||||
needs: [check, build]
|
||||
runs-on: ubuntu-latest
|
||||
services:
|
||||
docker:
|
||||
image: docker:dind
|
||||
env:
|
||||
DOCKER_TLS_CERTDIR: ""
|
||||
env:
|
||||
DOCKER_HOST: tcp://docker:2375
|
||||
steps:
|
||||
- name: Load saved Docker image
|
||||
uses: actions/download-artifact@v4
|
||||
|
||||
Reference in New Issue
Block a user