Skip to content

Commit 66ad599

Browse files
committed
update actions
1 parent 6069270 commit 66ad599

File tree

3 files changed

+58
-33
lines changed

3 files changed

+58
-33
lines changed

.github/workflows/ci.yaml

Lines changed: 15 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -15,19 +15,27 @@ jobs:
1515
steps:
1616
- name: Checkout code
1717
uses: actions/checkout@v4
18+
with:
19+
submodules: recursive
20+
1821

1922
- name: Set up Go
2023
uses: actions/setup-go@v5
2124
with:
2225
go-version-file: go.mod
2326

24-
- name: make tidy
27+
- name: Install Task
28+
uses: arduino/setup-task@v2
29+
with:
30+
version: 3.x
31+
32+
- name: make generate
2533
run: |
26-
make tidy
34+
task generate
2735
git diff --exit-code
28-
29-
- name: make verify
30-
run: make verify
3136
32-
- name: make test
33-
run: make test
37+
- name: task validate
38+
run: task validate
39+
40+
- name: task test
41+
run: task test

.github/workflows/publish.yaml

Lines changed: 16 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,7 @@ on:
33
push:
44
tags:
55
- v*
6-
workflow_dispatch:
7-
6+
workflow_dispatch:
87

98
permissions:
109
packages: write
@@ -23,11 +22,17 @@ jobs:
2322
ssh-key: ${{ secrets.PUSH_KEY }}
2423
fetch-tags: true
2524
fetch-depth: 0
25+
submodules: recursive
26+
27+
- name: Install Task
28+
uses: arduino/setup-task@v2
29+
with:
30+
version: 3.x
2631

2732
- name: Read and validate VERSION
2833
id: version
2934
run: |
30-
VERSION=$(cat VERSION)
35+
VERSION=$(task version)
3136
if [[ ! "$VERSION" =~ ^v[0-9]+\.[0-9]+\.[0-9]+(-dev)?$ ]]; then
3237
echo "Invalid version format in VERSION file: $VERSION"
3338
exit 1
@@ -43,7 +48,7 @@ jobs:
4348
exit 0
4449
4550
- name: Set up QEMU
46-
uses: docker/setup-qemu-action@v2
51+
uses: docker/setup-qemu-action@v3
4752

4853
- name: Set up Docker Context for Buildx
4954
id: buildx-context
@@ -59,7 +64,7 @@ jobs:
5964

6065
- name: Set up Docker Buildx
6166
timeout-minutes: 5
62-
uses: docker/setup-buildx-action@v2
67+
uses: docker/setup-buildx-action@v3
6368
with:
6469
version: latest
6570

@@ -68,24 +73,14 @@ jobs:
6873
with:
6974
go-version-file: go.mod
7075

71-
- name: Build the ${{ github.repository }}
76+
- name: Build and Push Images
7277
run: |
73-
make prepare-release
74-
make build
75-
76-
- name: Build Images
77-
run: |
78-
IMAGE_REGISTRY=ghcr.io/openmcp-project make image-build
79-
80-
- name: setup OCM
81-
uses: open-component-model/ocm-setup-action@main
78+
task build:img:all
8279
83-
- name: Create OCM CTF
80+
- name: Package and Push Helm Charts
8481
run: |
85-
ocm add componentversions --create \
86-
--file ctf component-constructor.yaml \
87-
--settings settings.yaml -- VERSION=${{ env.version }}
82+
task build:helm:all
8883
89-
- name: Push CTF
84+
- name: Build and Push OCM Component
9085
run: |
91-
ocm transfer ctf --overwrite ./ctf ${{ env.OCI_URL }}
86+
task build:ocm:all

.github/workflows/release.yaml

Lines changed: 27 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -19,11 +19,17 @@ jobs:
1919
ssh-key: ${{ secrets.PUSH_KEY }}
2020
fetch-tags: true
2121
fetch-depth: 0
22+
submodules: recursive
23+
24+
- name: Install Task
25+
uses: arduino/setup-task@v2
26+
with:
27+
version: 3.x
2228

2329
- name: Read and validate VERSION
2430
id: version
2531
run: |
26-
VERSION=$(cat VERSION)
32+
VERSION=$(task version)
2733
if [[ ! "$VERSION" =~ ^v[0-9]+\.[0-9]+\.[0-9]+(-dev)?$ ]]; then
2834
echo "Invalid version format in VERSION file: $VERSION"
2935
exit 1
@@ -63,7 +69,7 @@ jobs:
6369
6470
git tag -a "${{ env.version }}" -m "Release ${{ env.version }}"
6571
git push origin "${{ env.version }}"
66-
72+
6773
- name: Build Changelog
6874
id: github_release
6975
uses: mikepenz/release-changelog-builder-action@v5
@@ -97,7 +103,23 @@ jobs:
97103
}
98104
env:
99105
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
100-
106+
107+
- name: Create Git tag for api submodule
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 "api/${{ env.version }}" -m "Release ${{ env.version }}"
121+
git push origin "api/${{ env.version }}"
122+
101123
- name: Create GitHub release
102124
if: ${{ env.SKIP != 'true' }}
103125
uses: softprops/action-gh-release@v2
@@ -113,9 +135,9 @@ jobs:
113135
- name: Push dev VERSION
114136
if: ${{ env.SKIP != 'true' }}
115137
run: |
116-
echo "${{ env.version }}-dev" > VERSION
138+
task release:set-version -- "${{ env.version }}-dev"
117139
git config user.name "${{ env.AUTHOR_NAME }}"
118140
git config user.email "${{ env.AUTHOR_EMAIL }}"
119141
git add VERSION
120142
git commit -m "Update VERSION to ${{ env.version }}-dev"
121-
git push origin main
143+
git push origin main

0 commit comments

Comments
 (0)