Jlo/update go to 1.22 (#31) #31
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: CI | |
on: | |
pull_request: | |
branches: main | |
push: | |
branches: | |
- main | |
release: | |
types: | |
- published | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Check out code | |
uses: actions/checkout@v2 | |
- name: Install Go | |
uses: actions/setup-go@v2 | |
with: | |
go-version: 1.22.x | |
- name: Test | |
run: make test | |
- uses: azure/docker-login@v1 | |
with: | |
username: '${{ secrets.DOCKER_USER }}' | |
password: '${{ secrets.DOCKER_PASS }}' | |
- name: Set up Docker Buildx | |
uses: crazy-max/ghaction-docker-buildx@v3 | |
with: | |
qemu-version: latest | |
buildx-version: latest | |
- name: "Build" | |
run: | | |
docker buildx build \ | |
--platform linux/amd64,linux/arm64,linux/arm/v7 \ | |
--output "type=image,push=false" \ | |
--build-arg COMMIT_SHA=${{ github.sha }} -t remote:${{ github.sha }} . | |
- id: tag | |
name: Get the tag | |
run: echo ::set-output name=TAG::${GITHUB_REF#refs/tags/} | |
if: ${{ github.event_name == 'release' }} | |
- name: "Push" | |
run: | | |
docker buildx build \ | |
--platform linux/amd64,linux/arm64,linux/arm/v7 \ | |
--output "type=image,push=true" \ | |
--build-arg COMMIT_SHA=${{ github.sha }} -t okteto/remote:${{ steps.tag.outputs.TAG }} . | |
if: ${{ github.event_name == 'release' }} |