feature/docker-build-arg
CI Feature / Load example-gitea-env.conf to pipeline env (push) Successful in 17s
unit-tests Bats test report
CI Feature / Bats tests (push) Successful in 1m12s
acc-tests Cucumber test report
CI Feature / Cucumber tests (push) Successful in 1m19s
CI Feature / Report Summary (push) Successful in 4s

This commit is contained in:
moilanik
2026-06-28 13:03:40 +03:00
parent f3abd42f17
commit bea0b5cfae
4 changed files with 39 additions and 1 deletions
+19
View File
@@ -345,6 +345,14 @@ DOCKER_REGISTRY: gitea.app.keskikuja.site/niko
DOCKER_IMAGE_NAME: my-app
```
**Inputit:**
| Parametri | Pakollinen | Kuvaus |
|-----------|------------|--------|
| `env_json` | Kyllä | Konffi `gitea-env.conf`:stä |
| `version` | Kyllä | Version string (check-version output) |
| `build_args` | Ei | Monirivinen KEY=VALUE-lista välitettynä `--build-arg`-lipuiksi `docker build` -komennolle |
**Käyttö reitittimessä:**
```yaml
@@ -356,8 +364,19 @@ docker-build-push:
with:
env_json: ${{ needs.load-config.outputs.env_json }}
version: ${{ needs.check-version.outputs.version }}
build_args: |
VERSION=${{ needs.check-version.outputs.version }}
```
**Dockerfilessä** ARG otetaan vastaan oletusarvolla ja kirjoitetaan tiedostoksi:
```dockerfile
ARG VERSION=unknown
RUN mkdir -p /app && echo "$VERSION" > /app/version.txt
```
Katso referenssi: repon juuren `Dockerfile` (`gitea-ci-library/Dockerfile`).
Tarkka input/secret-lista: `docs/workflows.md`.
### `helm-build-push.yml` — Helm chart build & push