[housekeeping] bump ci to Go 1.22 #15
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: Deploy | |
on: [push] | |
jobs: | |
build: | |
runs-on: "ubuntu-latest" | |
steps: | |
- name: "Checkout code" | |
uses: "actions/checkout@v2" | |
- uses: actions/setup-go@v2 | |
with: | |
go-version: '^1.22' | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v1 | |
- name: Prep binary dirs | |
run: | | |
mkdir -p linux/amd64 | |
mkdir -p linux/arm64 | |
- name: Build amd64 binary | |
env: | |
GOOS: linux | |
GOARCH: amd64 | |
CGO_ENABLED: 0 | |
run: go build -o linux/amd64/main main.go | |
- name: Build arm64 binary | |
env: | |
GOOS: linux | |
GOARCH: arm64 | |
CGO_ENABLED: 0 | |
run: go build -o linux/arm64/main main.go | |
- name: Docker login | |
run: echo ${{ secrets.GHCR_TOKEN }} | docker login ghcr.io --username lispyclouds --password-stdin | |
- name: Build and push image | |
run: docker buildx build --push --platform linux/amd64,linux/arm64 -t ghcr.io/bob-cd/artifact-local:latest . |