Skip to content

Commit

Permalink
Add setups for Golang and QEMU (#187)
Browse files Browse the repository at this point in the history
  • Loading branch information
lucacome authored May 5, 2021
1 parent 978cd60 commit a4656a8
Showing 1 changed file with 24 additions and 0 deletions.
24 changes: 24 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,14 @@ jobs:
steps:
- name: Checkout Repository
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Determine Go version from go.mod
run: echo "GO_VERSION=$(grep "go 1." go.mod | cut -d " " -f 2)" >> $GITHUB_ENV
- name: Setup QEMU
uses: docker/setup-qemu-action@v1
with:
platforms: arm,arm64,ppc64le,s390x,mips64le,386
- name: Docker Buildx
uses: docker/setup-buildx-action@v1
with:
Expand All @@ -60,6 +68,10 @@ jobs:
${{ runner.os }}-buildx-
- name: Determine GOPATH
run: echo "GOPATH=$(go env GOPATH)" >> $GITHUB_ENV
- name: Setup Golang Environment
uses: actions/setup-go@v2
with:
go-version: ${{ env.GO_VERSION }}
- name: Run GoReleaser
uses: goreleaser/goreleaser-action@v2
with:
Expand Down Expand Up @@ -91,9 +103,21 @@ jobs:
steps:
- name: Checkout Repository
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Retrieve Tag
id: get_version
run: echo ::set-output name=GIT_TAG::$(echo ${GITHUB_REF/refs\/tags\//} | tr -d v)
- name: Determine Go version from go.mod
run: echo "GO_VERSION=$(grep "go 1." go.mod | cut -d " " -f 2)" >> $GITHUB_ENV
- name: Setup Golang Environment
uses: actions/setup-go@v2
with:
go-version: ${{ env.GO_VERSION }}
- name: Setup QEMU
uses: docker/setup-qemu-action@v1
with:
platforms: arm,arm64,ppc64le,s390x,mips64le,386
- name: Docker Buildx
uses: docker/setup-buildx-action@v1
with:
Expand Down

0 comments on commit a4656a8

Please sign in to comment.