Skip to content

feat: Refactor Taskfile and component configuration to use dynamic va… #3

feat: Refactor Taskfile and component configuration to use dynamic va…

feat: Refactor Taskfile and component configuration to use dynamic va… #3

Workflow file for this run

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: Create GitHub App token
uses: actions/create-github-app-token@df432ceedc7162793a195dd1713ff69aefc7379e # v2
id: app-token
with:
# required
app-id: 1312871
private-key: ${{ secrets.OPENMCP_CI_APP_PRIVATE_KEY }}
- name: Checkout code
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
with:
token: ${{ steps.app-token.outputs.token }}
fetch-tags: true
fetch-depth: 0
submodules: recursive
- name: Install Task
uses: arduino/setup-task@v2
with:
version: 3.x
repo-token: ${{ secrets.GITHUB_TOKEN }}
- 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: 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@29109295f81e9208d7d86ff1c6c12d2833863392 # v3
- 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@184bdaa0721073962dff0199f1fb9940f07167d1 # 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@e468171a9de216ec08956ac3ada2f0791b6bd435 # v3
with:
version: latest
- name: Build and Push OCM Component
run: |
task build --verbose
task push --verbose