push test

This commit is contained in:
techknowlogick 2023-03-05 00:14:25 -05:00
parent 1fe1942424
commit dc425c685a
1 changed files with 13 additions and 7 deletions

View File

@ -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 }}