Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
90 changes: 90 additions & 0 deletions .github/workflows/publish.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,90 @@
name: publish
on:
push:
tags:
- v*
workflow_dispatch:

permissions:
packages: write

env:
OCI_URL: ghcr.io/openmcp-project

jobs:
release_tag:
name: Release version
runs-on: ubuntu-24.04
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
ssh-key: ${{ secrets.PUSH_KEY }}
fetch-tags: true
fetch-depth: 0

- name: Read and validate VERSION
id: version
run: |
VERSION=$(cat VERSION)
if [[ ! "$VERSION" =~ ^v[0-9]+\.[0-9]+\.[0-9]+(-dev)?$ ]]; then
echo "Invalid version format in VERSION file: $VERSION"
exit 1
fi
echo "New version: $VERSION"
echo "version=$VERSION" >> $GITHUB_ENV

- name: Skip release if version is a dev version
if: contains(env.version, '-dev')
run: |
echo "Skipping development version release: ${{ env.version }}"
echo "SKIP=true" >> $GITHUB_ENV
exit 0

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

- name: Set up Docker Context for Buildx
id: buildx-context
run: |
docker context create builders

- name: Login to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

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

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

- name: Build the ${{ github.repository }}
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

- name: Create OCM CTF
run: |
ocm add componentversions --create \
--file ctf component-constructor.yaml \
--settings settings.yaml -- VERSION=${{ env.version }}

- name: Push CTF
run: |
ocm transfer ctf ./ctf ${{ env.OCI_URL }}
4 changes: 2 additions & 2 deletions charts/project-workspace-operator/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@ apiVersion: v2
name: btpflm-project-workspace-operator
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

not sure about the btpflm thing here

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, let's change that to e.g. openmcp-project-workspace-operator.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Or just project-workspace-operator if the path of the Helm chart (e.g. for its installation) is sufficient enough.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@maximiliantech @maximilianbraun updated, please check.

description: A Helm chart for the project-workspace-operator
type: application
version: v0.9.0
appVersion: v0.9.0
version: v0.10.0
appVersion: v0.10.0
19 changes: 19 additions & 0 deletions component-constructor.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
components:
- name: ${COMPONENT_NAME_PREFIX}/${COMPONENT_NAME}
version: ${VERSION}
provider:
name: ${PROVIDER}
resources:
- name: ${COMPONENT_NAME}-chart
type: helmChart
input:
type: helm
path: ./charts/${COMPONENT_NAME}

- name: ${COMPONENT_NAME}
type: ociImage
input:
type: dockermulti
variants:
- "${COMPONENT_REPO_PREFIX}:${VERSION}-linux-amd64"
- "${COMPONENT_REPO_PREFIX}:${VERSION}-linux-arm64"
4 changes: 4 additions & 0 deletions settings.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
COMPONENT_NAME: project-workspace-operator
COMPONENT_NAME_PREFIX: github.com/openmcp-project
PROVIDER: openmcp-project
COMPONENT_REPO_PREFIX: ghcr.io/openmcp-project/project-workspace-operator
Loading