From a0d0507b7a69258c4f7f789e11a105f93496ff29 Mon Sep 17 00:00:00 2001 From: Rakesh Patel Date: Tue, 6 Aug 2024 15:51:53 -0700 Subject: [PATCH 1/2] Add docker build to goreleaser --- .github/workflows/release.yaml | 10 ++++++++++ .goreleaser.yaml | 7 +++++++ Dockerfile | 3 +++ 3 files changed, 20 insertions(+) create mode 100644 Dockerfile diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index e8bd5aa..f1d9d38 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -16,6 +16,16 @@ jobs: uses: actions/checkout@v4 with: fetch-depth: 0 + - name: Configure AWS credentials + uses: aws-actions/configure-aws-credentials@v4 + with: + aws-region: "us-east-1" + aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }} + aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }} + - name: Docker Login + uses: aws-actions/amazon-ecr-login@v2 + with: + registry-type: public - name: Release with GoReleaser uses: goreleaser/goreleaser-action@v6 with: diff --git a/.goreleaser.yaml b/.goreleaser.yaml index 8a3fb3a..da33772 100644 --- a/.goreleaser.yaml +++ b/.goreleaser.yaml @@ -61,3 +61,10 @@ brews: commit_author: name: WorkOS email: support@workos.com +dockers: + - ids: + - linux + image_templates: + - "public.ecr.aws/p9s6f8y8/workos-cli:{{.Version}}" + build_flag_templates: + - "--platform=linux/amd64" diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..b368223 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,3 @@ +FROM scratch +COPY ./bin/workos /bin/workos +ENTRYPOINT ["/bin/workos"] \ No newline at end of file From 0bc04a4bb1f9e724933f2932523a67f36b973bd8 Mon Sep 17 00:00:00 2001 From: Rakesh Patel Date: Wed, 21 Aug 2024 10:31:16 -0700 Subject: [PATCH 2/2] Add newline to docker file --- .goreleaser.yaml | 4 ++-- Dockerfile | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.goreleaser.yaml b/.goreleaser.yaml index da33772..52d10a1 100644 --- a/.goreleaser.yaml +++ b/.goreleaser.yaml @@ -13,7 +13,7 @@ builds: - -s -w -X main.version={{.Version}} -X main.commit={{.Commit}} -X main.date={{.Date}} - id: linux goos: [linux] - goarch: [386, arm, amd64, arm64] + goarch: ["386", arm, amd64, arm64] env: - CGO_ENABLED=0 binary: bin/workos @@ -22,7 +22,7 @@ builds: - -s -w -X main.version={{.Version}} -X main.commit={{.Commit}} -X main.date={{.Date}} - id: windows goos: [windows] - goarch: [386, amd64, arm64] + goarch: ["386", amd64, arm64] binary: bin/workos main: ./cmd/workos/ ldflags: diff --git a/Dockerfile b/Dockerfile index b368223..fcc6344 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,3 +1,3 @@ FROM scratch COPY ./bin/workos /bin/workos -ENTRYPOINT ["/bin/workos"] \ No newline at end of file +ENTRYPOINT ["/bin/workos"]