From 231679e7d8b6aab1b8b12eb8200ed2e306d4449c Mon Sep 17 00:00:00 2001 From: Indradhanush Gupta Date: Mon, 9 Dec 2024 19:43:03 +0530 Subject: [PATCH 1/4] build(.github): Add docker build and push --- .github/workflows/docker-push.yml | 38 +++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100644 .github/workflows/docker-push.yml diff --git a/.github/workflows/docker-push.yml b/.github/workflows/docker-push.yml new file mode 100644 index 0000000..0fe45f2 --- /dev/null +++ b/.github/workflows/docker-push.yml @@ -0,0 +1,38 @@ +name: Build and Push Docker Image + +on: + push: + tags: + - 'v*' + branches: + - main + +jobs: + build-and-push: + runs-on: ubuntu-latest + steps: + - name: Checkout code + uses: actions/checkout@v3 + with: + fetch-depth: 0 + + - name: Set up Go + uses: actions/setup-go@v4 + with: + go-version: '1.20' + + - name: Login to Docker Hub + uses: docker/login-action@v2 + with: + registry: docker.io + username: ${{ secrets.DOCKERHUB_USERNAME }} + password: ${{ secrets.DOCKERHUB_TOKEN }} + + - name: Build and push + run: | + VERSION=$(git describe --exact-match 2> /dev/null || git describe --match=$(git rev-parse --short=8 HEAD) --always --dirty --abbrev=8) + make image + make push + +env: + REGISTRY: rackspacengpc From 97017e6609c7533294b13abcf38dd34057bd500b Mon Sep 17 00:00:00 2001 From: Indradhanush Gupta Date: Mon, 9 Dec 2024 19:46:36 +0530 Subject: [PATCH 2/4] fixup! build(.github): Add docker build and push --- .github/workflows/docker-push.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/docker-push.yml b/.github/workflows/docker-push.yml index 0fe45f2..b1a247f 100644 --- a/.github/workflows/docker-push.yml +++ b/.github/workflows/docker-push.yml @@ -5,7 +5,7 @@ on: tags: - 'v*' branches: - - main + - '*' jobs: build-and-push: From cb290d73991024687b3e842da0b246a3769b547d Mon Sep 17 00:00:00 2001 From: Indradhanush Gupta Date: Mon, 9 Dec 2024 19:47:35 +0530 Subject: [PATCH 3/4] fixup! build(.github): Add docker build and push --- .github/workflows/docker-push.yml | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/.github/workflows/docker-push.yml b/.github/workflows/docker-push.yml index b1a247f..c08fd8d 100644 --- a/.github/workflows/docker-push.yml +++ b/.github/workflows/docker-push.yml @@ -1,11 +1,7 @@ name: Build and Push Docker Image on: - push: - tags: - - 'v*' - branches: - - '*' + pull_request: jobs: build-and-push: From 657c96b729716178bb09001a041aedba4d13ab49 Mon Sep 17 00:00:00 2001 From: Indradhanush Gupta Date: Mon, 9 Dec 2024 20:17:36 +0530 Subject: [PATCH 4/4] go mod fixes from private/thenilesh/gomod-replace-directive-fix --- go.mod | 11 ++++++++--- go.sum | 6 ++++++ 2 files changed, 14 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index 24518d1..8eece80 100644 --- a/go.mod +++ b/go.mod @@ -121,8 +121,13 @@ require ( sigs.k8s.io/yaml v1.3.0 // indirect ) +// To update the forked versions, execute the following commands: +// go mod edit -replace=github.com/gophercloud/gophercloud=github.com/platform9/gophercloud@master && go mod tidy +// go mod edit -replace=github.com/gophercloud/utils=github.com/platform9/gophercloud-utils@master && go mod tidy +// go mod edit -replace=k8s.io/cloud-provider=github.com/platform9/k8s-cloud-provider@release-1.27 && go mod tidy + replace ( - github.com/gophercloud/gophercloud => ../gophercloud - github.com/gophercloud/utils => ../gophercloud-utils - k8s.io/cloud-provider => ../k8s-cloud-provider + github.com/gophercloud/gophercloud => github.com/platform9/gophercloud v0.0.0-20230725192123-f5bf8afaa214 + github.com/gophercloud/utils => github.com/platform9/gophercloud-utils v0.0.0-20230725192416-bb0e57cadb96 + k8s.io/cloud-provider => github.com/platform9/k8s-cloud-provider v0.0.0-20230630054839-fab92f8cbf80 ) diff --git a/go.sum b/go.sum index 919b991..09a13a7 100644 --- a/go.sum +++ b/go.sum @@ -253,6 +253,12 @@ github.com/os-pc/gocloudlb v0.0.0-20210529010120-65b17b6d1ffa h1:1AqEZeYDKWyZrjA github.com/os-pc/gocloudlb v0.0.0-20210529010120-65b17b6d1ffa/go.mod h1:vCN4JD8GTX/YkdqM3FVBtGBuHwJdC8ZRcJJHllq6qas= github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= +github.com/platform9/gophercloud v0.0.0-20230725192123-f5bf8afaa214 h1:bU1PqbNGTSunjQZ4UvRFuh2BwxHWNT7ov9oY2P3Ahc8= +github.com/platform9/gophercloud v0.0.0-20230725192123-f5bf8afaa214/go.mod h1:aAVqcocTSXh2vYFZ1JTvx4EQmfgzxRcNupUfxZbBNDM= +github.com/platform9/gophercloud-utils v0.0.0-20230725192416-bb0e57cadb96 h1:9V8M13+vmuVDVmIcEXCknMTWUS9Gq0k40V3FXRwSPLU= +github.com/platform9/gophercloud-utils v0.0.0-20230725192416-bb0e57cadb96/go.mod h1:Qf8/V6MKkUzts4ma+TZEKLxRmS21iHi9raKDuet+d9Q= +github.com/platform9/k8s-cloud-provider v0.0.0-20230630054839-fab92f8cbf80 h1:RfGKZixkVyrqmn5T/y2F5uE/sX+Z2UeKbYipiphLiGo= +github.com/platform9/k8s-cloud-provider v0.0.0-20230630054839-fab92f8cbf80/go.mod h1:zIpLFNTyWQ7j7aC3DJ3NYFm0eOcD22OI9NUPBaiadso= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/prometheus/client_golang v1.16.0 h1:yk/hx9hDbrGHovbci4BY+pRMfSuuat626eFsHb7tmT8=