Skip to content
Merged
Show file tree
Hide file tree
Changes from 3 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
21 changes: 14 additions & 7 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,20 +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: task validate
run: task validate

- name: make test
run: make test
- name: task test
run: task test
30 changes: 13 additions & 17 deletions .github/workflows/publish.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,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 Down Expand Up @@ -67,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
26 changes: 24 additions & 2 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 @@ -97,6 +103,22 @@ jobs:
}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Create Git tag for api submodule
if: ${{ env.SKIP != 'true' }}
run: |
AUTHOR_NAME=$(git log -1 --pretty=format:'%an')
AUTHOR_EMAIL=$(git log -1 --pretty=format:'%ae')
echo "Tagging as $AUTHOR_NAME <$AUTHOR_EMAIL>"

echo "AUTHOR_NAME=$AUTHOR_NAME" >> $GITHUB_ENV
echo "AUTHOR_EMAIL=$AUTHOR_EMAIL" >> $GITHUB_ENV

git config user.name "$AUTHOR_NAME"
git config user.email "$AUTHOR_EMAIL"

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

- name: Create GitHub release
if: ${{ env.SKIP != 'true' }}
Expand All @@ -113,7 +135,7 @@ 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
Expand Down
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
234 changes: 0 additions & 234 deletions Makefile

This file was deleted.

1 change: 1 addition & 0 deletions Makefile
Loading