-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
adding helm release components and helm and docker image builds
- Loading branch information
Showing
13 changed files
with
94 additions
and
0 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
name: Create release | ||
on: | ||
push: | ||
tags: | ||
- 'v*' | ||
|
||
permissions: | ||
contents: read | ||
env: | ||
REGISTRY: ghcr.io | ||
DOCKERFILE: ${{ github.workspace }}/goreleaser.dockerfile | ||
|
||
jobs: | ||
release: | ||
permissions: | ||
contents: 'write' | ||
id-token: 'write' | ||
pull-requests: 'read' | ||
repository-projects: 'write' | ||
packages: 'write' | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Prepare | ||
id: prep | ||
run: | | ||
VERSION=sha-${GITHUB_SHA::8} | ||
if [[ $GITHUB_REF == refs/tags/* ]]; then | ||
VERSION=${GITHUB_REF/refs\/tags\//} | ||
fi | ||
echo ::set-output name=BUILD_DATE::$(date -u +'%Y-%m-%dT%H:%M:%SZ') | ||
echo ::set-output name=VERSION::${VERSION} | ||
- name: Log in to the Container registry | ||
uses: docker/login-action@v3 | ||
with: | ||
registry: ${{ env.REGISTRY }} | ||
username: ${{ github.actor }} | ||
password: ${{ secrets.GITHUB_TOKEN }} | ||
- name: Install Helm | ||
uses: azure/setup-helm@v4 | ||
- name: Run GoReleaser | ||
uses: goreleaser/goreleaser-action@v5 | ||
with: | ||
version: latest | ||
args: release --release-notes=docs/release_notes/${{ steps.prep.outputs.VERSION }}.md --skip-validate | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
- name: Build and release the helm charts | ||
run: | | ||
helm registry login ghcr.io -u ${{ github.actor }} -p ${{ secrets.GITHUB_TOKEN }} | ||
helm package --version ${{ steps.prep.outputs.VERSION }} --app-version ${{ steps.prep.outputs.VERSION }} ./deploy/charts/bitwarden-sdk-server | ||
helm push ${{ github.event.repository.name }}-${{ steps.prep.outputs.VERSION }}.tgz oci://ghcr.io/external-secrets/charts |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -21,3 +21,4 @@ | |
go.work | ||
go.work.sum | ||
bin/ | ||
dist/ |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
# This is an example .goreleaser.yml file with some sensible defaults. | ||
# Make sure to check the documentation at https://goreleaser.com | ||
archives: | ||
- name_template: >- | ||
{{ .ProjectName }}_ | ||
{{- title .Os }}_ | ||
{{- if eq .Arch "amd64" }}x86_64 | ||
{{- else if eq .Arch "386" }}i386 | ||
{{- else }}{{ .Arch }}{{ end }} | ||
checksum: | ||
name_template: 'checksums.txt' | ||
snapshot: | ||
name_template: "{{ incpatch .Version }}-next" | ||
changelog: | ||
sort: asc | ||
filters: | ||
exclude: | ||
- '^docs:' | ||
- '^test:' | ||
# for more information on what this target does: https://goreleaser.com/errors/docker-build/ | ||
dockers: | ||
- id: linux-build | ||
image_templates: | ||
- "{{ .Env.REGISTRY }}/external-secrets/bitwarden-sdk-server:{{ .Tag }}" | ||
- "{{ .Env.REGISTRY }}/external-secrets/bitwarden-sdk-server:latest" | ||
# GOOS of the built binary that should be used. | ||
goos: linux | ||
# GOARCH of the built binary that should be used. | ||
goarch: amd64 | ||
dockerfile: Dockerfile | ||
build_flag_templates: | ||
- "--platform=linux/amd64" |
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
FROM gcr.io/distroless/static:nonroot | ||
WORKDIR / | ||
COPY bitwarden-sdk-server /bitwarden-sdk-server | ||
USER 65532:65532 | ||
|
||
EXPOSE 9998 | ||
ENV CGO_ENABLED=1 | ||
ENV BW_SECRETS_MANAGER_STATE_PATH='/state' | ||
ENTRYPOINT [ "/bitwarden-sdk-server", "serve" ] |