From cb25f650ca26fe6812c26ff4757cf4318e8c513c Mon Sep 17 00:00:00 2001 From: cuisongliu Date: Thu, 13 Jan 2022 20:44:01 +0800 Subject: [PATCH] feat(main): add ci --- .github/workflows/go.yml | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/.github/workflows/go.yml b/.github/workflows/go.yml index 7b0defd..b08aabd 100644 --- a/.github/workflows/go.yml +++ b/.github/workflows/go.yml @@ -31,3 +31,27 @@ jobs: env: GITHUB_TOKEN: ${{ secrets.GH_TOKEN }} VERSION: latest + - name: set up buildx + id: buildx + uses: crazy-max/ghaction-docker-buildx@v1 + with: + version: latest + + - name: Login to Docker Hub + uses: docker/login-action@v1 + with: + registry: ghcr.io + username: ${{ github.repository_owner }} + password: ${{ secrets.GITHUB_TOKEN }} + - name: build (and publish) main image + env: + # fork friendly ^^ + DOCKER_REPO: ghcr.io/${{ github.repository_owner }}/endpoints-operator + run: | + docker buildx build \ + --platform linux/amd64,linux/arm64 \ + --build-arg VERSION=dev \ + --push \ + -t ${DOCKER_REPO}:dev \ + -f Dockerfile \ + .