Skip to content

Commit 72a4658

Browse files
fix workflows
Signed-off-by: Takeshi Yoshimura <[email protected]>
1 parent 4ed71e6 commit 72a4658

File tree

4 files changed

+107
-77
lines changed

4 files changed

+107
-77
lines changed
Lines changed: 3 additions & 77 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,11 @@
1-
name: Build and push images
1+
name: Build and push controller images
22

33
on:
44
push:
55
branches:
66
- main
77
paths:
88
- api/**
9-
- cmd/**
109
- controllers/**
1110
- ./main.go
1211
- ./go.mod
@@ -24,7 +23,6 @@ env:
2423
jobs:
2524
build-push-bundle:
2625
runs-on: ubuntu-latest
27-
needs: build-push-controller
2826
env:
2927
IMAGE_NAME: ghcr.io/foundation-model-stack/ocp-efa-operator
3028
BUNDLE_IMAGE_NAME: ghcr.io/foundation-model-stack/ocp-efa-operator-bundle
@@ -66,7 +64,7 @@ jobs:
6664
${{ env.BUNDLE_IMAGE_NAME }}:latest
6765
${{ env.BUNDLE_IMAGE_NAME }}:v${{ env.VERSION }}
6866
file: ./bundle.Dockerfile
69-
67+
7068
build-push-controller:
7169
runs-on: ubuntu-latest
7270
env:
@@ -97,76 +95,4 @@ jobs:
9795
${{ env.IMAGE_NAME }}:${{ github.sha }}-${{ github.run_number }}
9896
${{ env.IMAGE_NAME }}:latest
9997
${{ env.IMAGE_NAME }}:v${{ env.VERSION }}
100-
file: ./Dockerfile
101-
102-
build-push-efa-dp:
103-
runs-on: ubuntu-latest
104-
env:
105-
IMAGE_NAME: ghcr.io/foundation-model-stack/ocp-efa-device-plugin
106-
CGO_ENABLED: 0
107-
GOOS: linux
108-
steps:
109-
- uses: actions/checkout@v2
110-
- uses: actions/setup-go@v2
111-
with:
112-
go-version: '1.21'
113-
- name: Tidy
114-
run: |
115-
go mod tidy
116-
- name: Set up Docker
117-
uses: docker/setup-buildx-action@v1
118-
- name: Login to Docker
119-
uses: docker/login-action@v1
120-
with:
121-
registry: ghcr.io
122-
username: ${{ secrets.GH_USERNAME }}
123-
password: ${{ secrets.GH_TOKEN }}
124-
- name: Build
125-
run: |
126-
go build -v -a -ldflags '-extldflags "-static"' -gcflags="all=-N -l" -o ./bin/ocp-efa-device-plugin ./cmd/ocp-efa-device-plugin/
127-
- name: Build and push efa device plugin
128-
uses: docker/build-push-action@v2
129-
with:
130-
context: ./bin/
131-
push: true
132-
tags: |
133-
${{ env.IMAGE_NAME }}:${{ github.sha }}-${{ github.run_number }}
134-
${{ env.IMAGE_NAME }}:latest
135-
${{ env.IMAGE_NAME }}:v${{ env.VERSION }}
136-
file: ./cmd/ocp-efa-device-plugin/Dockerfile
137-
138-
build-push-gdrdrv-dp:
139-
runs-on: ubuntu-latest
140-
env:
141-
IMAGE_NAME: ghcr.io/foundation-model-stack/ocp-gdrdrv-device-plugin
142-
CGO_ENABLED: 0
143-
GOOS: linux
144-
steps:
145-
- uses: actions/checkout@v2
146-
- uses: actions/setup-go@v2
147-
with:
148-
go-version: '1.21'
149-
- name: Tidy
150-
run: |
151-
go mod tidy
152-
- name: Set up Docker
153-
uses: docker/setup-buildx-action@v1
154-
- name: Login to Docker
155-
uses: docker/login-action@v1
156-
with:
157-
registry: ghcr.io
158-
username: ${{ secrets.GH_USERNAME }}
159-
password: ${{ secrets.GH_TOKEN }}
160-
- name: Build
161-
run: |
162-
go build -v -a -ldflags '-extldflags "-static"' -gcflags="all=-N -l" -o ./bin/ocp-gdrdrv-device-plugin ./cmd/ocp-gdrdrv-device-plugin/
163-
- name: Build and push gdrdrv device plugin
164-
uses: docker/build-push-action@v2
165-
with:
166-
context: ./bin/
167-
push: true
168-
tags: |
169-
${{ env.IMAGE_NAME }}:${{ github.sha }}-${{ github.run_number }}
170-
${{ env.IMAGE_NAME }}:latest
171-
${{ env.IMAGE_NAME }}:v${{ env.VERSION }}
172-
file: ./cmd/ocp-gdrdrv-device-plugin/Dockerfile
98+
file: ./Dockerfile
Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
name: Build and push efa device plugin images
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
paths:
8+
- cmd/ocp-efa-device-plugin/**
9+
- ./go.mod
10+
- ./go.sum
11+
workflow_dispatch:
12+
13+
env:
14+
VERSION: '0.0.1'
15+
IMAGE_REGISTRY: ghcr.io/${{ github.repository_owner }}
16+
17+
jobs:
18+
build-push-efa-dp:
19+
runs-on: ubuntu-latest
20+
env:
21+
IMAGE_NAME: ghcr.io/foundation-model-stack/ocp-efa-device-plugin
22+
CGO_ENABLED: 0
23+
GOOS: linux
24+
steps:
25+
- uses: actions/checkout@v2
26+
- uses: actions/setup-go@v2
27+
with:
28+
go-version: '1.21'
29+
- name: Tidy
30+
run: |
31+
go mod tidy
32+
- name: Set up Docker
33+
uses: docker/setup-buildx-action@v1
34+
- name: Login to Docker
35+
uses: docker/login-action@v1
36+
with:
37+
registry: ghcr.io
38+
username: ${{ secrets.GH_USERNAME }}
39+
password: ${{ secrets.GH_TOKEN }}
40+
- name: Build
41+
run: |
42+
go build -v -a -ldflags '-extldflags "-static"' -gcflags="all=-N -l" -o ./bin/ocp-efa-device-plugin ./cmd/ocp-efa-device-plugin/
43+
- name: Build and push efa device plugin
44+
uses: docker/build-push-action@v2
45+
with:
46+
context: ./bin/
47+
push: true
48+
tags: |
49+
${{ env.IMAGE_NAME }}:${{ github.sha }}-${{ github.run_number }}
50+
${{ env.IMAGE_NAME }}:latest
51+
${{ env.IMAGE_NAME }}:v${{ env.VERSION }}
52+
file: ./cmd/ocp-efa-device-plugin/Dockerfile
Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
name: Build and push gdrdrv device plugin images
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
paths:
8+
- cmd/ocp-gdrdrv-device-plugin/**
9+
- ./go.mod
10+
- ./go.sum
11+
workflow_dispatch:
12+
13+
env:
14+
VERSION: '0.0.1'
15+
IMAGE_REGISTRY: ghcr.io/${{ github.repository_owner }}
16+
17+
jobs:
18+
build-push-gdrdrv-dp:
19+
runs-on: ubuntu-latest
20+
env:
21+
IMAGE_NAME: ghcr.io/foundation-model-stack/ocp-gdrdrv-device-plugin
22+
CGO_ENABLED: 0
23+
GOOS: linux
24+
steps:
25+
- uses: actions/checkout@v2
26+
- uses: actions/setup-go@v2
27+
with:
28+
go-version: '1.21'
29+
- name: Tidy
30+
run: |
31+
go mod tidy
32+
- name: Set up Docker
33+
uses: docker/setup-buildx-action@v1
34+
- name: Login to Docker
35+
uses: docker/login-action@v1
36+
with:
37+
registry: ghcr.io
38+
username: ${{ secrets.GH_USERNAME }}
39+
password: ${{ secrets.GH_TOKEN }}
40+
- name: Build
41+
run: |
42+
go build -v -a -ldflags '-extldflags "-static"' -gcflags="all=-N -l" -o ./bin/ocp-gdrdrv-device-plugin ./cmd/ocp-gdrdrv-device-plugin/
43+
- name: Build and push gdrdrv device plugin
44+
uses: docker/build-push-action@v2
45+
with:
46+
context: ./bin/
47+
push: true
48+
tags: |
49+
${{ env.IMAGE_NAME }}:${{ github.sha }}-${{ github.run_number }}
50+
${{ env.IMAGE_NAME }}:latest
51+
${{ env.IMAGE_NAME }}:v${{ env.VERSION }}
52+
file: ./cmd/ocp-gdrdrv-device-plugin/Dockerfile

0 commit comments

Comments
 (0)