From 65ed6d6120c1e1a197cc5d186dc6cff0a9370e21 Mon Sep 17 00:00:00 2001 From: "franz.germann1" Date: Thu, 12 Dec 2024 09:35:58 +0100 Subject: [PATCH] forgejo workflow uses complete image now --- .github/workflows/.github-ci.yaml | 43 +++++++++++++++++++------------ 1 file changed, 26 insertions(+), 17 deletions(-) diff --git a/.github/workflows/.github-ci.yaml b/.github/workflows/.github-ci.yaml index 446abb5..1751ae2 100644 --- a/.github/workflows/.github-ci.yaml +++ b/.github/workflows/.github-ci.yaml @@ -1,23 +1,32 @@ name: ci-workflow - + on: [push] jobs: ci: - runs-on: docker - + runs-on: ubuntu-latest + container: - image: forgejo.edf-bootstrap.cx.fg1.ffm.osc.live/devfw-cicd/pipeline-container/kaniko:v1.23.2-2 - + image: forgejo.edf-bootstrap.cx.fg1.ffm.osc.live/devfw-cicd/complete:latest + steps: - - uses: actions/checkout@v3 - - - name: Build and push - uses: https://codeberg.org/umglurf/kaniko-action@main - with: - cache: true - cache_repo: forgejo.edf-bootstrap.cx.fg1.ffm.osc.live/${{ github.repository }}/cache - credentials: | - https://forgejo.edf-bootstrap.cx.fg1.ffm.osc.live/v1/=${{ secrets.REGISTRY_USERNAME }}:${{ secrets.REGISTRY_PASSWORD }} - destinations: | - forgejo.edf-bootstrap.cx.fg1.ffm.osc.live/${{ github.repository }}:latest - push: 'true' + + - name: Clone Repository + uses: https://forgejo.edf-bootstrap.cx.fg1.ffm.osc.live/DevFW-CICD/checkout@main + + - name: Lint the Repository + run: | + golangci-lint run ./... --out-format=json --timeout 5m --issues-exit-code 1 + + - name: Build Credentials File + run: | + mkdir -p /kaniko/.docker + AUTHSTRING=$(echo -n "${{ secrets.REGISTRY_USERNAME }}:${{ secrets.REGISTRY_PASSWORD }}" | base64) + echo "{\"auths\":{\"https://gitea.cnoe.localtest.me\":{\"auth\":\"${AUTHSTRING}\"}}}" > /kaniko/.docker/config.json + + - name: Build Docker Container + run: | + /kaniko/executor --skip-tls-verify --dockerfile=./Dockerfile --context=. --destination=gitea.cnoe.localtest.me/giteaadmin/fib:v0.0.1 + + - name: trivy + run: | + trivy ...