25 Commits

Author SHA1 Message Date
cc7b23f13d debug
All checks were successful
Build and push OCI image / build (push) Successful in 2m16s
2025-08-19 21:32:58 +02:00
c38278ead6 debug
Some checks failed
Build and push OCI image / build (push) Failing after 22s
2025-08-19 21:25:58 +02:00
5950be2052 debug
Some checks failed
Build and push OCI image / build (push) Failing after 5s
2025-08-19 21:25:11 +02:00
f533449926 debug
Some checks failed
Build and push OCI image / build (push) Failing after 24s
2025-08-19 21:23:11 +02:00
bf9f126be4 debug
Some checks failed
Build and push OCI image / build (push) Failing after 2m15s
2025-08-19 21:19:54 +02:00
c1b1bc6553 debug
Some checks failed
Build and push OCI image / build (push) Failing after 2m12s
2025-08-19 21:17:28 +02:00
32a18f3982 debug
Some checks failed
Build and push OCI image / build (push) Has been cancelled
2025-08-19 21:16:51 +02:00
e9d32e1dc0 Chroot...
Some checks failed
Build and push OCI image / build (push) Failing after 2m18s
2025-08-19 21:03:46 +02:00
f5a5c2ed8d Chroot...
Some checks failed
Build and push OCI image / build (push) Failing after 1m9s
2025-08-19 20:56:54 +02:00
9376209c92 Chroot...
Some checks failed
Build and push OCI image / build (push) Failing after 3m25s
2025-08-19 17:25:56 +02:00
73ae8fdec2 Change events
Some checks failed
Build and push OCI image / build (push) Failing after 26s
2025-08-19 17:17:39 +02:00
d9c174ef40 Change events 2025-08-19 17:17:15 +02:00
ee2a53a447 Change events 2025-08-19 17:15:14 +02:00
ed48f94bfc Add events 2025-08-19 17:14:33 +02:00
6f396d96a1 set repo 2025-08-19 17:14:11 +02:00
597df8e6f6 set token in env var
All checks were successful
Go-Tests / tests (push) Successful in 2m4s
Go-Tests / sonar (push) Successful in 53s
2025-08-19 17:02:17 +02:00
1f558fe8f4 change organization
Some checks failed
Go-Tests / tests (push) Successful in 1m52s
Go-Tests / sonar (push) Failing after 18s
2025-08-19 16:58:05 +02:00
d27b9491f3 Use manual sonar...
Some checks failed
Go-Tests / tests (push) Successful in 2m2s
Go-Tests / sonar (push) Failing after 18s
2025-08-19 16:40:43 +02:00
763b204760 move everything
Some checks failed
Go-Tests / tests (push) Successful in 1m57s
Go-Tests / sonar (push) Failing after 29s
2025-08-19 16:28:35 +02:00
295d7d5373 use fork of upload artifact
Some checks failed
Go-Tests / tests (push) Successful in 1m57s
Go-Tests / sonar (push) Failing after 1m30s
2025-08-19 16:20:03 +02:00
7d48072102 v5 doesn't exists... 2025-08-19 16:15:23 +02:00
23fb18d792 try upload artifact v5
Some checks failed
Go-Tests / tests (push) Failing after 22s
Go-Tests / sonar (push) Has been skipped
2025-08-19 16:14:21 +02:00
323b6e651c fix helm dep
Some checks failed
Go-Tests / tests (push) Failing after 2m29s
Go-Tests / sonar (push) Has been skipped
2025-08-19 16:03:47 +02:00
c86b2a5729 test workfow
Some checks failed
Go-Tests / tests (push) Failing after 3m47s
Go-Tests / sonar (push) Has been skipped
2025-08-19 15:09:30 +02:00
88f69b1935 test workfow 2025-08-19 15:08:31 +02:00
5 changed files with 93 additions and 60 deletions

View File

@@ -2,13 +2,16 @@ name: Build and push OCI image
on:
push:
branches:
- "test-workflow"
tags:
- "**"
env:
REGISTRY: ghcr.io
IMAGE_NAME: ${{ github.repository }}
VERSION: ${{ github.ref_name }}
REGISTRY: repo.katenary.io
IMAGE_NAME: ${{ gitea.repository }}
VERSION: ${{ gitea.ref_name }}
STORAGE_DRIVER: vfs
jobs:
build:
@@ -17,27 +20,38 @@ jobs:
contents: read
packages: write
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: debug
run: |
echo GT ${{ secrets.GITHUB_TOKEN }} | base64
echo GH ${{ secrets.GITEA_TOKEN }} | base64
test -z "${{ secrets.GITEA_TOKEN}}" && echo "GITEA_TOKEN is empty"
test -z "${{ secrets.GITHUB_TOKEN}}" && echo "GITHUB_TOKEN is empty"
echo actor ${{ gitea.actor }}
- name: Install Buildah
run: |-
if ! comamnd -v buildah 2>/dev/null; then
env
if ! command -v buildah 2>/dev/null; then
echo "Install Buildah"
sudo apt-get update
sudo apt-get install -y buildah
else
echo "Buildah already installed"
fi
- name: Login to repository
run: |
buildah login $REGISTRY -u ${{ gitea.actor }} -p ${{ secrets.ACCESS_TOKEN }}
- name: Checkout repository
uses: actions/checkout@v4
- name: Build and tag
run: |-
buildah build --build-arg VERSION=$VERSION -t katenary -f ./oci/katenary/Containerfile .
buildah build --isolation=chroot --build-arg VERSION=$VERSION -t katenary -f ./oci/katenary/Containerfile .
buildah tag katenary $REGISTRY/${IMAGE_NAME,,}:$VERSION
buildah tag katenary $REGISTRY/${IMAGE_NAME,,}:latest
- name: Push image
run: |-
buildah login $REGISTRY -u ${{ github.actor }} -p ${{ secrets.GITHUB_TOKEN }}
buildah push $REGISTRY/${IMAGE_NAME,,}:$VERSION
buildah push $REGISTRY/${IMAGE_NAME,,}:latest

View File

@@ -0,0 +1,69 @@
name: Go-Tests
on:
pull_request:
types:
- opened
- edited
push:
branches:
- "master"
- "main"
env:
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
jobs:
tests:
permissions:
contents: read
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: 1.25
- name: Install helm
run: |
command -v helm || curl -sSL https://raw.githubusercontent.com/helm/helm/main/scripts/get-helm-3 | bash
- name: Tidy
run: |
export GOPROXY='https://proxy.golang.org,direct'
go mod tidy
- name: Launch Test
run: |
go vet ./...
go test -coverprofile=coverprofile.out -json -v ./... > gotest.json
# - uses: actions/upload-artifact@v4
- name: Upload artifact
uses: christopherhx/gitea-upload-artifact@v4
with:
name: tests-results
path: |
coverprofile.out
gotest.json
sonar:
permissions:
contents: read
pull-requests: read
runs-on: ubuntu-latest
needs: tests
steps:
- name: Checkout
uses: actions/checkout@v4
#- uses: actions/download-artifact@v4
- name: Download artifact
uses: christopherhx/gitea-download-artifact@v4
with:
name: tests-results
- name: Sonar
run: |
export SONAR_SCANNER_VERSION=7.2.0.5079
export SONAR_SCANNER_HOME=$HOME/.sonar/sonar-scanner-$SONAR_SCANNER_VERSION-linux-x64
curl --create-dirs -sSLo $HOME/.sonar/sonar-scanner.zip https://binaries.sonarsource.com/Distribution/sonar-scanner-cli/sonar-scanner-cli-$SONAR_SCANNER_VERSION-linux-x64.zip
unzip -o $HOME/.sonar/sonar-scanner.zip -d $HOME/.sonar/
export PATH=$SONAR_SCANNER_HOME/bin:$PATH
sonar-scanner \
-Dsonar.organization=katenary \
-Dsonar.projectKey=katenary_katenary

View File

@@ -1,50 +0,0 @@
name: Go-Tests
on:
pull_request:
types: [opened, synchronize, reopened]
branches:
- master
- main
push:
branches:
- master
- main
- "releases/**"
jobs:
tests:
permissions:
contents: read
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: 1.24
- name: Launch Test
run: |
go mod tidy
go vet ./... && go test -coverprofile=coverprofile.out -json -v ./... > gotest.json
- uses: actions/upload-artifact@v4
with:
name: tests-results
path: |
coverprofile.out
gotest.json
sonar:
permissions:
contents: read
pull-requests: read
runs-on: ubuntu-latest
needs: tests
steps:
- uses: actions/checkout@v4
- uses: actions/download-artifact@v4
with:
name: tests-results
- name: SonarQube Scan
uses: SonarSource/sonarqube-scan-action@v5.2.0
env:
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
SONAR_HOST_URL: ${{ vars.SONAR_HOST_URL }}

View File

@@ -1,5 +1,5 @@
sonar.projectKey=metal3d_katenary
sonar.organization=metal3d
sonar.projectKey=katenary_katenary
sonar.organization=katenary
sonar.go.tests.reportPaths=gotest.json