diff --git a/.github/workflows/dev-publish.yaml b/.github/workflows/dev-publish.yaml new file mode 100644 index 0000000..a27bd2e --- /dev/null +++ b/.github/workflows/dev-publish.yaml @@ -0,0 +1,77 @@ +name: dev-publish +on: + 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 + submodules: recursive + + - name: Install Task + uses: arduino/setup-task@v2 + with: + version: 3.x + + - name: Read and validate VERSION + id: version + run: | + VERSION=$(task version) + if [[ ! "$VERSION" =~ ^v[0-9]+\.[0-9]+\.[0-9]+(-dev(-[0-9a-f]*)?)?$ ]]; then + echo "Invalid version format: $VERSION" + exit 1 + fi + echo "New version: $VERSION" + echo "version=$VERSION" >> $GITHUB_ENV + + - 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 and Push Images + run: | + task build:img:all + + - name: Package and Push Helm Charts + run: | + task build:helm:all + + - name: Build and Push OCM Component + run: | + task build:ocm:all