Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update Release to build arm64 image #216

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
37 changes: 37 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,32 @@ jobs:
with:
name: authn-linux64
path: dist/authn-linux64
linux64Arm:
name: Compile for Linux ARM
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- uses: actions/setup-go@v2
with:
go-version: ^1.17
- run: go mod download

- name: compile
run: |
go build \
-ldflags "-extldflags -static -X main.VERSION=${VERSION##*/v}" \
-o dist/authn-linux64arm
env:
VERSION: ${{ github.ref }}
GOOS: linux
GOARCH: arm64
CGO_ENABLED: 1

- uses: actions/upload-artifact@v2
with:
name: authn-linux64arm
path: dist/authn-linux64arm
Comment on lines +57 to +60
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you might be able to verify the linux64Arm step by running it in your fork, grabbing the artifact, and making sure it executes as expected


windows64:
name: Compile for Windows
Expand Down Expand Up @@ -117,6 +143,16 @@ jobs:
asset_path: ./authn-linux64/authn-linux64
asset_name: authn-linux64
asset_content_type: application/octet-stream

- name: Upload Linux64Arm
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./authn-linux64arm/authn-linux64arm
asset_name: authn-linux64arm
asset_content_type: application/octet-stream

- name: Upload Windows64
uses: actions/upload-release-asset@v1
Expand Down Expand Up @@ -167,3 +203,4 @@ jobs:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
tags: latest,${{ steps.version.outputs.number }}
platform: linux/amd64,linux/arm64
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It looks like the Dockerfile only adds the authn-linux64 binary. You may need to make both binaries available in the build context and then somehow use ARG TARGETPLATFORM to add the correct one?