From ea750c762c6b308f7878582132ec54f2cf7de621 Mon Sep 17 00:00:00 2001 From: Pavel Sinitskiy Date: Wed, 12 Jan 2022 16:45:31 +0300 Subject: [PATCH 1/4] ci --- .github/workflows/kryptonite-image.yaml | 41 +++++++++++++++++++++++++ go.mod | 2 +- go.sum | 4 +-- 3 files changed, 44 insertions(+), 3 deletions(-) create mode 100644 .github/workflows/kryptonite-image.yaml diff --git a/.github/workflows/kryptonite-image.yaml b/.github/workflows/kryptonite-image.yaml new file mode 100644 index 0000000000000..bf85e51cfd3db --- /dev/null +++ b/.github/workflows/kryptonite-image.yaml @@ -0,0 +1,41 @@ +name: Create and publish a Docker image + +on: + push: + branches: ['kryptonite-ci'] + +env: + REGISTRY: ghcr.io + IMAGE_NAME: ${{ github.repository }} + +jobs: + build-and-push-image: + runs-on: ubuntu-latest + permissions: + contents: read + packages: write + + steps: + - name: Checkout repository + uses: actions/checkout@v2 + + - name: Log in to the Container registry + uses: docker/login-action@f054a8b539a109f9f41c372932f1ae047eff08c9 + with: + registry: ${{ env.REGISTRY }} + username: ${{ github.actor }} + password: ${{ secrets.GITHUB_TOKEN }} + + - name: Extract metadata (tags, labels) for Docker + id: meta + uses: docker/metadata-action@98669ae865ea3cffbcbaa878cf57c20bbf1c6c38 + with: + images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }} + + - name: Build and push Docker image + uses: docker/build-push-action@ad44023a93711e3deb337508980b4b5e9bcdc5dc + with: + context: . + push: true + tags: ${{ steps.meta.outputs.tags }} + labels: ${{ steps.meta.outputs.labels }} diff --git a/go.mod b/go.mod index d2bd2f6132580..3ae24ac1b3a20 100644 --- a/go.mod +++ b/go.mod @@ -256,4 +256,4 @@ require ( golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1 // indirect ) -replace github.com/minio/console => github.com/Kryptonite-RU/minio-console v0.13.6 +replace github.com/minio/console => github.com/Kryptonite-RU/minio-console v0.13.4-0.20220112115313-0d1b03f9205b diff --git a/go.sum b/go.sum index 4dac91cefb907..5223f73b2f4ec 100644 --- a/go.sum +++ b/go.sum @@ -125,8 +125,8 @@ github.com/Djarvur/go-err113 v0.1.0/go.mod h1:4UJr5HIiMZrwgkSPdsjy2uOQExX/WEILpI github.com/GoogleCloudPlatform/cloudsql-proxy v0.0.0-20191009163259-e802c2cb94ae/go.mod h1:mjwGPas4yKduTyubHvD1Atl9r1rUq8DfVy+gkVvZ+oo= github.com/GoogleCloudPlatform/k8s-cloud-provider v0.0.0-20190822182118-27a4ced34534/go.mod h1:iroGtC8B3tQiqtds1l+mgk/BBOrxbqjH+eUfFQYRc14= github.com/Knetic/govaluate v3.0.1-0.20171022003610-9aa49832a739+incompatible/go.mod h1:r7JcOSlj0wfOMncg0iLm8Leh48TZaKVeNIfJntJ2wa0= -github.com/Kryptonite-RU/minio-console v0.13.6 h1:bzLxfEdxWRkNGkQNKby/54Z63gsAX/sVWcqftBLi35Q= -github.com/Kryptonite-RU/minio-console v0.13.6/go.mod h1:jXzCkW7CbIZjlNQ9zMbUd9sQk/f9B7zJ6ieSl9fWioM= +github.com/Kryptonite-RU/minio-console v0.13.4-0.20220112115313-0d1b03f9205b h1:ox5A7PV6pRDLWq1hSOKrcFwN6XbjazLt6XlybXU5Bow= +github.com/Kryptonite-RU/minio-console v0.13.4-0.20220112115313-0d1b03f9205b/go.mod h1:jXzCkW7CbIZjlNQ9zMbUd9sQk/f9B7zJ6ieSl9fWioM= github.com/Masterminds/semver v1.5.0/go.mod h1:MB6lktGJrhw8PrUyiEoblNEGEQ+RzHPF078ddwwvV3Y= github.com/Masterminds/semver/v3 v3.0.3/go.mod h1:VPu/7SZ7ePZ3QOrcuXROw5FAcLl4a0cBrbBpGY/8hQs= github.com/Masterminds/semver/v3 v3.1.0/go.mod h1:VPu/7SZ7ePZ3QOrcuXROw5FAcLl4a0cBrbBpGY/8hQs= From 2dd88c574f8e7ecd9ca4944d0c0de3acd455434e Mon Sep 17 00:00:00 2001 From: Pavel Sinitskiy Date: Wed, 12 Jan 2022 17:08:08 +0300 Subject: [PATCH 2/4] add buil binary --- .github/workflows/kryptonite-image.yaml | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/.github/workflows/kryptonite-image.yaml b/.github/workflows/kryptonite-image.yaml index bf85e51cfd3db..d21a19c1b82bb 100644 --- a/.github/workflows/kryptonite-image.yaml +++ b/.github/workflows/kryptonite-image.yaml @@ -19,6 +19,20 @@ jobs: - name: Checkout repository uses: actions/checkout@v2 + - name: Setup go + uses: actions/setup-go@v2 + with: + go-version: 1.17.x + + - name: Build binary + env: + CGO_ENABLED: 0 + GO111MODULE: on + run: | + sudo sysctl net.ipv6.conf.all.disable_ipv6=0 + sudo sysctl net.ipv6.conf.default.disable_ipv6=0 + make crosscompile + - name: Log in to the Container registry uses: docker/login-action@f054a8b539a109f9f41c372932f1ae047eff08c9 with: From 278a497db2d4f87532282aeea28114609bada12a Mon Sep 17 00:00:00 2001 From: Pavel Sinitskiy Date: Wed, 12 Jan 2022 17:13:32 +0300 Subject: [PATCH 3/4] fix build --- .github/workflows/kryptonite-image.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/kryptonite-image.yaml b/.github/workflows/kryptonite-image.yaml index d21a19c1b82bb..8158d75225072 100644 --- a/.github/workflows/kryptonite-image.yaml +++ b/.github/workflows/kryptonite-image.yaml @@ -31,7 +31,7 @@ jobs: run: | sudo sysctl net.ipv6.conf.all.disable_ipv6=0 sudo sysctl net.ipv6.conf.default.disable_ipv6=0 - make crosscompile + make build - name: Log in to the Container registry uses: docker/login-action@f054a8b539a109f9f41c372932f1ae047eff08c9 From 081a9ac5956fc584a0e1458ec2f9500d7f6aadcd Mon Sep 17 00:00:00 2001 From: Pavel Sinitskiy Date: Wed, 12 Jan 2022 18:12:33 +0300 Subject: [PATCH 4/4] trigger for build --- .github/workflows/kryptonite-image.yaml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/kryptonite-image.yaml b/.github/workflows/kryptonite-image.yaml index 8158d75225072..928db5c98763d 100644 --- a/.github/workflows/kryptonite-image.yaml +++ b/.github/workflows/kryptonite-image.yaml @@ -2,7 +2,8 @@ name: Create and publish a Docker image on: push: - branches: ['kryptonite-ci'] + tags: + - '*-kryptonite' env: REGISTRY: ghcr.io