Skip to content

Commit 1ac8a04

Browse files
authored
fix: broken component-constructor spec (#21)
1 parent 37219c5 commit 1ac8a04

2 files changed

Lines changed: 25 additions & 25 deletions

File tree

.github/workflows/release.yaml

Lines changed: 24 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -57,14 +57,22 @@ jobs:
5757
echo "Skipping development version release: ${{ env.version }}"
5858
echo "SKIP=true" >> $GITHUB_ENV
5959
exit 0
60-
61-
- name: Login to GitHub Container Registry
60+
61+
- name: Create Git tag
6262
if: ${{ env.SKIP != 'true' }}
63-
uses: docker/login-action@74a5d142397b4f367a81961eba4e8cd7edddf772 # v3
64-
with:
65-
registry: ghcr.io
66-
username: ${{ github.actor }}
67-
password: ${{ secrets.GITHUB_TOKEN }}
63+
run: |
64+
AUTHOR_NAME=$(git log -1 --pretty=format:'%an')
65+
AUTHOR_EMAIL=$(git log -1 --pretty=format:'%ae')
66+
echo "Tagging as $AUTHOR_NAME <$AUTHOR_EMAIL>"
67+
68+
echo "AUTHOR_NAME=$AUTHOR_NAME" >> $GITHUB_ENV
69+
echo "AUTHOR_EMAIL=$AUTHOR_EMAIL" >> $GITHUB_ENV
70+
71+
git config user.name "$AUTHOR_NAME"
72+
git config user.email "$AUTHOR_EMAIL"
73+
74+
git tag -a "${{ env.version }}" -m "Release ${{ env.version }}"
75+
git push origin "${{ env.version }}"
6876
6977
- name: setup OCM
7078
if: ${{ env.SKIP != 'true' }}
@@ -75,7 +83,7 @@ jobs:
7583
run: |
7684
ocm add componentversions --create \
7785
--file openmcp-ctf component-constructor.yaml \
78-
--settings components-versions.yaml -- OPENMCP_VERSION=${{ env.version }}
86+
--settings components-versions.yaml -- OPENMCP_VERSION=${{ env.version }} OPENMCP_VERSION_COMMIT=$(git show-ref --hash ${{ env.version }})
7987
8088
- name: Get PR body for current commit
8189
id: release_highlights
@@ -103,23 +111,6 @@ jobs:
103111
./hack/generate_release_notes.sh openmcp-ctf >> RELEASE_BODY.md
104112
env:
105113
GH_TOKEN: ${{ github.token }}
106-
107-
- name: Create Git tag
108-
if: ${{ env.SKIP != 'true' }}
109-
run: |
110-
AUTHOR_NAME=$(git log -1 --pretty=format:'%an')
111-
AUTHOR_EMAIL=$(git log -1 --pretty=format:'%ae')
112-
echo "Tagging as $AUTHOR_NAME <$AUTHOR_EMAIL>"
113-
114-
echo "AUTHOR_NAME=$AUTHOR_NAME" >> $GITHUB_ENV
115-
echo "AUTHOR_EMAIL=$AUTHOR_EMAIL" >> $GITHUB_ENV
116-
117-
git config user.name "$AUTHOR_NAME"
118-
git config user.email "$AUTHOR_EMAIL"
119-
120-
git tag -a "${{ env.version }}" -m "Release ${{ env.version }}"
121-
git push origin "${{ env.version }}"
122-
123114

124115
- name: Create GitHub release
125116
if: ${{ env.SKIP != 'true' }}
@@ -133,6 +124,14 @@ jobs:
133124
env:
134125
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
135126

127+
- name: Login to GitHub Container Registry
128+
if: ${{ env.SKIP != 'true' }}
129+
uses: docker/login-action@74a5d142397b4f367a81961eba4e8cd7edddf772 # v3
130+
with:
131+
registry: ghcr.io
132+
username: ${{ github.actor }}
133+
password: ${{ secrets.GITHUB_TOKEN }}
134+
136135
- name: Push CTF
137136
if: ${{ env.SKIP != 'true' }}
138137
run: |

component-constructor.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ components:
3131
sources:
3232
- access:
3333
ref: "refs/tags/${OPENMCP_VERSION}"
34+
commit: "${OPENMCP_VERSION_COMMIT}"
3435
type: gitHub
3536
repoUrl: https://github.com/openmcp-project/openmcp
3637
name: openmcp

0 commit comments

Comments
 (0)