tuleeko kontti?
CI / Load gitea-env.conf to pipeline env (push) Successful in 10s
ci-cucumber Cucumber tests
ci-bats Bats tests
ci-build Build complete
CI / Build & Push Artifact (push) Successful in 2m34s

This commit is contained in:
moilanik
2026-06-14 09:48:39 +03:00
parent 5ac7516672
commit daa5dc58ed
2 changed files with 34 additions and 14 deletions
+22 -2
View File
@@ -62,14 +62,27 @@ jobs:
needs: [check, quality-gate] needs: [check, quality-gate]
if: needs.check.outputs.artifact_exists == 'false' if: needs.check.outputs.artifact_exists == 'false'
runs-on: ubuntu-latest runs-on: ubuntu-latest
services:
docker:
image: docker:dind
env:
DOCKER_TLS_CERTDIR: ""
env:
DOCKER_HOST: tcp://docker:2375
steps: steps:
- uses: actions/checkout@v4 - uses: actions/checkout@v4
- name: Build container - name: Build container
run: | 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 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 - name: Save Docker image for next job
uses: actions/upload-artifact@v4 uses: actions/upload-artifact@v4
@@ -80,6 +93,13 @@ jobs:
push: push:
needs: [check, build] needs: [check, build]
runs-on: ubuntu-latest runs-on: ubuntu-latest
services:
docker:
image: docker:dind
env:
DOCKER_TLS_CERTDIR: ""
env:
DOCKER_HOST: tcp://docker:2375
steps: steps:
- name: Load saved Docker image - name: Load saved Docker image
uses: actions/download-artifact@v4 uses: actions/download-artifact@v4
+12 -12
View File
@@ -11,22 +11,22 @@ jobs:
with: with:
config_path: .gitea/workflows/gitea-env.conf config_path: .gitea/workflows/gitea-env.conf
feature: # feature:
name: Quality Gate # name: Quality Gate
if: github.ref != 'refs/heads/main' # if: github.ref != 'refs/heads/main'
needs: [load-config] # needs: [load-config]
uses: niko/gitea-ci-library/.gitea/workflows/quality-gate.yml@main # uses: niko/gitea-ci-library/.gitea/workflows/quality-gate.yml@main
secrets: inherit # secrets: inherit
with: # with:
env_json: ${{ needs.load-config.outputs.env_json }} # env_json: ${{ needs.load-config.outputs.env_json }}
bats-image: bats/bats:latest # bats-image: bats/bats:latest
cucumber-node-image: node:22 # cucumber-node-image: node:22
main: main:
name: Build & Push Artifact name: Build & Push Artifact
if: github.ref == 'refs/heads/main' # if: github.ref == 'refs/heads/main' # FIXME: väliaikainen — ajetaan tässä haarassa
needs: [load-config] needs: [load-config]
uses: niko/gitea-ci-library/.gitea/workflows/build_publish-artifact.yml@main uses: niko/gitea-ci-library/.gitea/workflows/build_publish-artifact.yml@feature/docker-kuntoon
secrets: inherit secrets: inherit
with: with:
env_json: ${{ needs.load-config.outputs.env_json }} env_json: ${{ needs.load-config.outputs.env_json }}