Compare commits
4 commits
developmen
...
runner-din
Author | SHA1 | Date | |
---|---|---|---|
eff506729b | |||
0ce0ceb087 | |||
b2d6e6f28f | |||
da86126a62 |
1 changed files with 18 additions and 25 deletions
43
.github/workflows/.github-ci.yaml
vendored
43
.github/workflows/.github-ci.yaml
vendored
|
@ -1,33 +1,26 @@
|
|||
name: ci-workflow
|
||||
|
||||
on: [push]
|
||||
|
||||
jobs:
|
||||
ci:
|
||||
runs-on: docker
|
||||
|
||||
container:
|
||||
image: forgejo.edf-bootstrap.cx.fg1.ffm.osc.live/devfw-cicd/pipeline-container/complete:v0.0.3
|
||||
|
||||
|
||||
steps:
|
||||
|
||||
- name: Clone Repository
|
||||
uses: https://forgejo.edf-bootstrap.cx.fg1.ffm.osc.live/DevFW-CICD/checkout@main
|
||||
|
||||
- name: Lint the Repository
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Debug
|
||||
run: |
|
||||
golangci-lint run ./... --out-format=json --timeout 10m --issues-exit-code 1
|
||||
|
||||
- name: Build Credentials File
|
||||
run: |
|
||||
mkdir -p ~/.docker
|
||||
AUTHSTRING=$(echo -n "${{ secrets.REGISTRY_USERNAME }}:${{ secrets.REGISTRY_PASSWORD }}" | base64 -w 0)
|
||||
echo "{\"auths\":{\"https://forgejo.edf-bootstrap.cx.fg1.ffm.osc.live\":{\"auth\":\"${AUTHSTRING}\"}}}" > ~/.docker/config.json
|
||||
|
||||
- name: Build Docker Container
|
||||
run: |
|
||||
KO_DOCKER_REPO="forgejo.edf-bootstrap.cx.fg1.ffm.osc.live/devfw-cicd/fibonacci_go" ko build --bare ./cmd
|
||||
|
||||
- name: Vulnerability Scanning
|
||||
run: |
|
||||
trivy image --scanners license,vuln,secret forgejo.edf-bootstrap.cx.fg1.ffm.osc.live/devfw-cicd/fibonacci_go:latest
|
||||
trivy image --image-config-scanners secret,misconfig forgejo.edf-bootstrap.cx.fg1.ffm.osc.live/devfw-cicd/fibonacci_go:latest
|
||||
echo 1 test 2 ${{ secrets.PACKAGES_USER }} 3 ${{ secrets.REPO_USER }} 4
|
||||
|
||||
- name: Build
|
||||
uses: https://codeberg.org/umglurf/kaniko-action@main
|
||||
with:
|
||||
cache: true
|
||||
cache_repo: forgejo.edf-bootstrap.cx.fg1.ffm.osc.live/devfw-cicd/fibonacci_go/cache
|
||||
credentials: |
|
||||
forgejo.edf-bootstrap.cx.fg1.ffm.osc.live=${{ secrets.PACKAGES_USER }}:${{ secrets.PACKAGES_TOKEN }}
|
||||
destinations: |
|
||||
forgejo.edf-bootstrap.cx.fg1.ffm.osc.live/devfw-cicd/fibonacci_go:1.2.3
|
||||
push: 'true'
|
||||
|
|
Loading…
Reference in a new issue