From 63933b57fca28fa194d6403bd1cf681eeceb6ad7 Mon Sep 17 00:00:00 2001 From: Owen Date: Tue, 29 Jul 2025 09:47:33 -0700 Subject: [PATCH] Update cicd Former-commit-id: 25b58e868b1640dcaacb5e69f55f044ee82a4bdb --- .github/workflows/cicd.yml | 29 +++++++++-------------------- Makefile | 21 ++------------------- 2 files changed, 11 insertions(+), 39 deletions(-) diff --git a/.github/workflows/cicd.yml b/.github/workflows/cicd.yml index 20f5df7..ff05268 100644 --- a/.github/workflows/cicd.yml +++ b/.github/workflows/cicd.yml @@ -17,12 +17,6 @@ jobs: - name: Set up Docker Buildx uses: docker/setup-buildx-action@v2 - - name: Log in to Docker Hub - uses: docker/login-action@v2 - with: - username: ${{ secrets.DOCKER_HUB_USERNAME }} - password: ${{ secrets.DOCKER_HUB_ACCESS_TOKEN }} - - name: Extract tag name id: get-tag run: echo "TAG=${GITHUB_REF#refs/tags/}" >> $GITHUB_ENV @@ -32,20 +26,15 @@ jobs: with: go-version: 1.23.1 - - name: Update version in main.go - run: | - TAG=${{ env.TAG }} - if [ -f main.go ]; then - sed -i 's/Olm version replaceme/Olm version '"$TAG"'/' main.go - echo "Updated main.go with version $TAG" - else - echo "main.go not found" - fi - - - name: Build and push Docker images - run: | - TAG=${{ env.TAG }} - make docker-build-release tag=$TAG + # - name: Update version in main.go + # run: | + # TAG=${{ env.TAG }} + # if [ -f main.go ]; then + # sed -i 's/Olm version replaceme/Olm version '"$TAG"'/' main.go + # echo "Updated main.go with version $TAG" + # else + # echo "main.go not found" + # fi - name: Build binaries run: | diff --git a/Makefile b/Makefile index 9303e87..2a09ad9 100644 --- a/Makefile +++ b/Makefile @@ -1,22 +1,5 @@ -all: build push - -docker-build-release: - @if [ -z "$(tag)" ]; then \ - echo "Error: tag is required. Usage: make build-all tag="; \ - exit 1; \ - fi - docker buildx build --platform linux/arm64,linux/amd64 -t fosrl/olm:latest -f Dockerfile --push . - docker buildx build --platform linux/arm64,linux/amd64 -t fosrl/olm:$(tag) -f Dockerfile --push . - -build: - docker build -t fosrl/olm:latest . - -push: - docker push fosrl/olm:latest - -test: - docker run fosrl/olm:latest +all: go-build-release local: CGO_ENABLED=0 go build -o olm @@ -29,4 +12,4 @@ go-build-release: CGO_ENABLED=0 GOOS=windows GOARCH=amd64 go build -o bin/olm_windows_amd64.exe clean: - rm olm + rm olm \ No newline at end of file