Skip to content

Commit bb0c59a

Browse files
committed
refactor flow
Signed-off-by: clyi <clyi@alauda.io>
1 parent bb87215 commit bb0c59a

File tree

7 files changed

+164
-166
lines changed

7 files changed

+164
-166
lines changed

.github/workflows/build-arm64-image.yaml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,9 @@ jobs:
2727
runs-on: ubuntu-24.04-arm
2828
steps:
2929
- uses: actions/checkout@v4
30+
with:
31+
ref: ${{ github.head_ref || github.ref }}
32+
fetch-depth: 2
3033
- uses: docker/setup-buildx-action@v3
3134

3235
- uses: actions/setup-go@v5
@@ -38,7 +41,7 @@ jobs:
3841

3942
- name: Setup environment variables
4043
run: |
41-
echo "TAG=$(cat VERSION)" >> "$GITHUB_ENV"
44+
echo "TAG=$(cat VERSION)-xfeature" >> "$GITHUB_ENV"
4245
echo "GO_FULL_VER=$(go env GOVERSION)" >> "$GITHUB_ENV"
4346
4447
- name: Go Cache
@@ -125,13 +128,12 @@ jobs:
125128
run: make release-arm
126129

127130
- name: Push
128-
if: github.ref_name == github.event.repository.default_branch || startsWith(github.ref_name, 'release-')
129131
env:
130132
DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }}
131133
DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }}
132134
COMMIT: ${{ github.sha }}
133135
run: |
134-
TAG=$(cat VERSION)
136+
TAG=$(cat VERSION)-xfeature
135137
echo "$DOCKER_PASSWORD" | docker login -u "$DOCKER_USERNAME" --password-stdin
136138
docker tag kubeovn/kube-ovn:$TAG kubeovn/kube-ovn:$TAG-arm
137139
docker tag kubeovn/kube-ovn:$TAG kubeovn/kube-ovn-dev:$COMMIT-arm

.github/workflows/build-kube-ovn-base-dpdk.yaml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ on:
1111
- release-1.13
1212
- release-1.12
1313
- release-1.12-mc
14+
- xfeature
1415
schedule:
1516
- cron: "20 19 * * *"
1617

@@ -24,6 +25,7 @@ jobs:
2425
- release-1.13
2526
- release-1.12
2627
- release-1.12-mc
28+
- xfeature
2729
name: Build AMD64
2830
runs-on: ubuntu-24.04
2931
steps:
@@ -58,6 +60,7 @@ jobs:
5860
- release-1.13
5961
- release-1.12
6062
- release-1.12-mc
63+
- xfeature
6164
needs:
6265
- build-amd64
6366
name: push
@@ -87,7 +90,7 @@ jobs:
8790
COMMIT: ${{ github.sha }}
8891
run: |
8992
cat VERSION
90-
TAG=$(cat VERSION)
93+
TAG=$(cat VERSION)-xfeature
9194
echo "$DOCKER_PASSWORD" | docker login -u "$DOCKER_USERNAME" --password-stdin
9295
docker images
9396
docker tag kubeovn/kube-ovn-base:$TAG-amd64-dpdk kubeovn/kube-ovn-base:$TAG-dpdk

.github/workflows/build-kube-ovn-base.yaml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ on:
1313
- release-1.11
1414
- release-1.9
1515
- release-1.12-mc
16+
- xfeature
1617
schedule:
1718
- cron: "20 19 * * *"
1819

@@ -31,6 +32,7 @@ jobs:
3132
- release-1.11
3233
- release-1.9
3334
- release-1.12-mc
35+
- xfeature
3436
name: Build
3537
runs-on: ${{ matrix.arch == 'arm64' && 'ubuntu-24.04-arm' || 'ubuntu-24.04' }}
3638
steps:
@@ -78,6 +80,7 @@ jobs:
7880
- release-1.11
7981
- release-1.9
8082
- release-1.12-mc
83+
- xfeature
8184
needs:
8285
- build
8386
name: push
@@ -114,7 +117,7 @@ jobs:
114117
COMMIT: ${{ github.sha }}
115118
run: |
116119
cat VERSION
117-
TAG=$(cat VERSION)
120+
TAG=$(cat VERSION)-xfeature
118121
echo "$DOCKER_PASSWORD" | docker login -u "$DOCKER_USERNAME" --password-stdin
119122
docker images
120123
docker push kubeovn/kube-ovn-base:$TAG-amd64

0 commit comments

Comments
 (0)