Skip to content

feat: build & release cross-platform Docker images #1178

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

Merged
merged 8 commits into from
May 12, 2022
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
add Docker dependencies to release.yaml
  • Loading branch information
bpmct committed May 11, 2022
commit 9bc38cc082d715587fa02c860d248a479a5381cf
17 changes: 17 additions & 0 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,27 @@ on:
jobs:
goreleaser:
runs-on: macos-latest
env:
# Necessary for Docker manifest
DOCKER_CLI_EXPERIMENTAL: "enabled"
steps:
# Docker is not included on macos-latest
- uses: docker-practice/actions-setup-docker@v1

- uses: actions/checkout@v3
with:
fetch-depth: 0

- name: Set up QEMU
uses: docker/setup-qemu-action@v1

- name: Docker Login
uses: docker/login-action@v1
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
Comment on lines +28 to +30
Copy link
Member Author

Choose a reason for hiding this comment

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

Actually, we need a PAT here. Will probably need help from an org admin to get this

from: https://carlosbecker.com/posts/multi-platform-docker-images-goreleaser-gh-actions/

We need to login into the GitHub Container Registry with a Personal Access Token (PAT), since the default GITHUB_TOKEN does not have enough permissions


- uses: actions/setup-go@v3
with:
go-version: "~1.18"
Expand Down
1 change: 1 addition & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
FROM alpine

# Generated by goreleaser on `goreleaser release`
ADD coder /opt/coder

ENTRYPOINT [ "/opt/coder", "server" ]