Skip to content

Commit 25b58e8

Browse files
Update cicd
1 parent 6420434 commit 25b58e8

File tree

2 files changed

+11
-39
lines changed

2 files changed

+11
-39
lines changed

.github/workflows/cicd.yml

Lines changed: 9 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -17,12 +17,6 @@ jobs:
1717
- name: Set up Docker Buildx
1818
uses: docker/setup-buildx-action@v2
1919

20-
- name: Log in to Docker Hub
21-
uses: docker/login-action@v2
22-
with:
23-
username: ${{ secrets.DOCKER_HUB_USERNAME }}
24-
password: ${{ secrets.DOCKER_HUB_ACCESS_TOKEN }}
25-
2620
- name: Extract tag name
2721
id: get-tag
2822
run: echo "TAG=${GITHUB_REF#refs/tags/}" >> $GITHUB_ENV
@@ -32,20 +26,15 @@ jobs:
3226
with:
3327
go-version: 1.23.1
3428

35-
- name: Update version in main.go
36-
run: |
37-
TAG=${{ env.TAG }}
38-
if [ -f main.go ]; then
39-
sed -i 's/Olm version replaceme/Olm version '"$TAG"'/' main.go
40-
echo "Updated main.go with version $TAG"
41-
else
42-
echo "main.go not found"
43-
fi
44-
45-
- name: Build and push Docker images
46-
run: |
47-
TAG=${{ env.TAG }}
48-
make docker-build-release tag=$TAG
29+
# - name: Update version in main.go
30+
# run: |
31+
# TAG=${{ env.TAG }}
32+
# if [ -f main.go ]; then
33+
# sed -i 's/Olm version replaceme/Olm version '"$TAG"'/' main.go
34+
# echo "Updated main.go with version $TAG"
35+
# else
36+
# echo "main.go not found"
37+
# fi
4938

5039
- name: Build binaries
5140
run: |

Makefile

Lines changed: 2 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,5 @@
11

2-
all: build push
3-
4-
docker-build-release:
5-
@if [ -z "$(tag)" ]; then \
6-
echo "Error: tag is required. Usage: make build-all tag=<tag>"; \
7-
exit 1; \
8-
fi
9-
docker buildx build --platform linux/arm64,linux/amd64 -t fosrl/olm:latest -f Dockerfile --push .
10-
docker buildx build --platform linux/arm64,linux/amd64 -t fosrl/olm:$(tag) -f Dockerfile --push .
11-
12-
build:
13-
docker build -t fosrl/olm:latest .
14-
15-
push:
16-
docker push fosrl/olm:latest
17-
18-
test:
19-
docker run fosrl/olm:latest
2+
all: go-build-release
203

214
local:
225
CGO_ENABLED=0 go build -o olm
@@ -29,4 +12,4 @@ go-build-release:
2912
CGO_ENABLED=0 GOOS=windows GOARCH=amd64 go build -o bin/olm_windows_amd64.exe
3013

3114
clean:
32-
rm olm
15+
rm olm

0 commit comments

Comments
 (0)