Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 15 additions & 7 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,19 +15,27 @@ jobs:
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
submodules: recursive


- name: Set up Go
uses: actions/setup-go@v5
with:
go-version-file: go.mod

- name: make tidy
- name: Install Task
uses: arduino/setup-task@v2
with:
version: 3.x

- name: make generate
run: |
make tidy
task generate
git diff --exit-code

- name: make verify
run: make verify

- name: make test
run: make test
- name: task validate
run: task validate

- name: task test
run: task test
37 changes: 16 additions & 21 deletions .github/workflows/publish.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,7 @@ on:
push:
tags:
- v*
workflow_dispatch:

workflow_dispatch:

permissions:
packages: write
Expand All @@ -23,11 +22,17 @@ jobs:
ssh-key: ${{ secrets.PUSH_KEY }}
fetch-tags: true
fetch-depth: 0
submodules: recursive

- name: Install Task
uses: arduino/setup-task@v2
with:
version: 3.x

- name: Read and validate VERSION
id: version
run: |
VERSION=$(cat VERSION)
VERSION=$(task version)
if [[ ! "$VERSION" =~ ^v[0-9]+\.[0-9]+\.[0-9]+(-dev)?$ ]]; then
echo "Invalid version format in VERSION file: $VERSION"
exit 1
Expand All @@ -43,7 +48,7 @@ jobs:
exit 0

- name: Set up QEMU
uses: docker/setup-qemu-action@v2
uses: docker/setup-qemu-action@v3

- name: Set up Docker Context for Buildx
id: buildx-context
Expand All @@ -59,7 +64,7 @@ jobs:

- name: Set up Docker Buildx
timeout-minutes: 5
uses: docker/setup-buildx-action@v2
uses: docker/setup-buildx-action@v3
with:
version: latest

Expand All @@ -68,24 +73,14 @@ jobs:
with:
go-version-file: go.mod

- name: Build the ${{ github.repository }}
- name: Build and Push Images
run: |
make prepare-release
make build

- name: Build Images
run: |
IMAGE_REGISTRY=ghcr.io/openmcp-project make image-build

- name: setup OCM
uses: open-component-model/ocm-setup-action@main
task build:img:all

- name: Create OCM CTF
- name: Package and Push Helm Charts
run: |
ocm add componentversions --create \
--file ctf component-constructor.yaml \
--settings settings.yaml -- VERSION=${{ env.version }}
task build:helm:all

- name: Push CTF
- name: Build and Push OCM Component
run: |
ocm transfer ctf --overwrite ./ctf ${{ env.OCI_URL }}
task build:ocm:all
16 changes: 11 additions & 5 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,17 @@ jobs:
ssh-key: ${{ secrets.PUSH_KEY }}
fetch-tags: true
fetch-depth: 0
submodules: recursive

- name: Install Task
uses: arduino/setup-task@v2
with:
version: 3.x

- name: Read and validate VERSION
id: version
run: |
VERSION=$(cat VERSION)
VERSION=$(task version)
if [[ ! "$VERSION" =~ ^v[0-9]+\.[0-9]+\.[0-9]+(-dev)?$ ]]; then
echo "Invalid version format in VERSION file: $VERSION"
exit 1
Expand Down Expand Up @@ -63,7 +69,7 @@ jobs:

git tag -a "${{ env.version }}" -m "Release ${{ env.version }}"
git push origin "${{ env.version }}"

- name: Build Changelog
id: github_release
uses: mikepenz/release-changelog-builder-action@v5
Expand Down Expand Up @@ -97,7 +103,7 @@ jobs:
}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Create GitHub release
if: ${{ env.SKIP != 'true' }}
uses: softprops/action-gh-release@v2
Expand All @@ -113,9 +119,9 @@ jobs:
- name: Push dev VERSION
if: ${{ env.SKIP != 'true' }}
run: |
echo "${{ env.version }}-dev" > VERSION
task release:set-version -- "${{ env.version }}-dev"
git config user.name "${{ env.AUTHOR_NAME }}"
git config user.email "${{ env.AUTHOR_EMAIL }}"
git add VERSION
git commit -m "Update VERSION to ${{ env.version }}-dev"
git push origin main
git push origin main
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -42,3 +42,6 @@ secret.env

test/e2e/testdata/serect.yaml
integration-tests.xml

cover.root.html
api/cover.root.html
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[submodule "hack/common"]
path = hack/common
url = https://github.com/openmcp-project/build
24 changes: 24 additions & 0 deletions .golangci.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
version: "2"
run:
concurrency: 4
linters:
exclusions:
generated: lax
presets:
- comments
- common-false-positives
- legacy
- std-error-handling
paths:
- zz_generated.*\.go$
- tmp/.*
- third_party$
- builtin$
- examples$
formatters:
exclusions:
generated: lax
paths:
- third_party$
- builtin$
- examples$
39 changes: 0 additions & 39 deletions .golangci.yml

This file was deleted.

Loading