diff --git a/.gitea/workflows/build-publish.yaml b/.gitea/workflows/build-publish.yaml index f795824..337ce80 100644 --- a/.gitea/workflows/build-publish.yaml +++ b/.gitea/workflows/build-publish.yaml @@ -8,7 +8,7 @@ jobs: docker: strategy: matrix: - arch: ['ubuntu-latest', 'arm-ubuntu-latest'] + arch: ['ubuntu-latest'] go-version: ['1.20'] git-version: ['2.38.4'] golangci-lint-version: ['1.51.2'] @@ -25,15 +25,21 @@ jobs: id: arch - name: setup buildx uses: https://github.com/docker/setup-buildx-action@v2 - - name: Login to Docker Hub - uses: https://github.com/docker/login-action@v2 - with: - username: ${{ secrets.DOCKER_USERNAME }} - password: ${{ secrets.DOCKER_PASSWORD }} + - name: login into docker hub + run: | + BASE64_AUTH=`echo -n "$CI_REGISTRY_USER:$CI_REGISTRY_PASSWORD" | base64` + mkdir -p ~/.docker + echo "{\"auths\": {\"$CI_REGISTRY\": {\"auth\": \"$BASE64_AUTH\"}}}" > ~/.docker/config.json + env: + CI_REGISTRY: https://index.docker.io/v1/ + CI_REGISTRY_USER: ${{ secrets.DOCKER_USERNAME }} + CI_REGISTRY_PASSWORD: ${{ secrets.DOCKER_PASSWORD }} - name: build image uses: https://github.com/docker/build-push-action@v4 with: - tags: gitea/test_env:linux-${{ matrix.go-version }}-${{ steps.arch.outputs.value }} + push: true + platforms: linux/amd64,linux/arm64 + tags: gitea/test_env:linux-${{ matrix.go-version }} build-args: | GOLANG_VERSION=${{ matrix.go-version }} GIT_VERSION=${{ matrix.git-version }}