From 6c176b3cdb2deba0ac609d8171487ba8ede8f11c Mon Sep 17 00:00:00 2001 From: KoCoder Date: Sun, 6 Oct 2024 10:22:54 +0200 Subject: [PATCH] Container-tags: add version, use diffrent names for web, api, and console --- .gitea/workflows/build-docker-container.yml | 21 ++++++++++++--------- 1 file changed, 12 insertions(+), 9 deletions(-) diff --git a/.gitea/workflows/build-docker-container.yml b/.gitea/workflows/build-docker-container.yml index f6e8782..7c7615a 100644 --- a/.gitea/workflows/build-docker-container.yml +++ b/.gitea/workflows/build-docker-container.yml @@ -16,30 +16,33 @@ jobs: - name: "Git checkout" run: git checkout "${{ gitea.sha }}" - uses: aevea/action-kaniko@master - name: Run Kaniko to build our docker container. + name: Run Kaniko to build our api docker container. with: - image: kocoded/nachhilfesystem/nachhilfesystem - tag: api + image: kocoded/nachhilfesystem/api + tag: ${{ git.workflow_sha }} + tag_with_latest: github.ref == 'refs/heads/master' registry: git.kocoder.xyz username: ${{ secrets.CI_RUNNER_USER }} password: ${{ secrets.CI_RUNNER_TOKEN }} build_file: Dockerfile target: api_serve - uses: aevea/action-kaniko@master - name: Run Kaniko to build our docker container. + name: Run Kaniko to build our web docker container. with: - image: kocoded/nachhilfesystem/nachhilfesystem - tag: web + image: kocoded/nachhilfesystem/web + tag: ${{ git.workflow_sha }} + tag_with_latest: github.ref == 'refs/heads/master' registry: git.kocoder.xyz username: ${{ secrets.CI_RUNNER_USER }} password: ${{ secrets.CI_RUNNER_TOKEN }} build_file: Dockerfile target: web_serve - uses: aevea/action-kaniko@master - name: Run Kaniko to build our docker container. + name: Run Kaniko to build our console docker container. with: - image: kocoded/nachhilfesystem/nachhilfesystem - tag: console + image: kocoded/nachhilfesystem/console + tag: ${{ git.workflow_sha }} + tag_with_latest: github.ref == 'refs/heads/master' registry: git.kocoder.xyz username: ${{ secrets.CI_RUNNER_USER }} password: ${{ secrets.CI_RUNNER_TOKEN }}