forgejo workflow uses complete image now
This commit is contained in:
parent
c502b65940
commit
65ed6d6120
1 changed files with 26 additions and 17 deletions
43
.github/workflows/.github-ci.yaml
vendored
43
.github/workflows/.github-ci.yaml
vendored
|
@ -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 ...
|
||||
|
|
Loading…
Reference in a new issue