-
-
Notifications
You must be signed in to change notification settings - Fork 354
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into release/v0.6.0
- Loading branch information
Showing
7 changed files
with
127 additions
and
323 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,39 @@ | ||
name: Create release | ||
|
||
permissions: | ||
contents: write | ||
|
||
on: | ||
push: | ||
tags: | ||
- 'v*' | ||
|
||
jobs: | ||
release: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout the target Git reference | ||
uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 | ||
|
||
- name: Log in to Docker Hub | ||
uses: docker/login-action@v3 | ||
with: | ||
username: ${{ secrets.DOCKERHUB_USERNAME }} | ||
password: ${{ secrets.DOCKERHUB_TOKEN }} | ||
|
||
- name: Set up Golang | ||
uses: actions/setup-go@v5 | ||
with: | ||
go-version-file: go.mod | ||
|
||
- name: Set up Docker buildx | ||
uses: docker/setup-buildx-action@v3 | ||
|
||
- name: Run GoReleaser | ||
uses: goreleaser/goreleaser-action@v5 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
with: | ||
args: release |
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,72 @@ | ||
project_name: glanceapp/glance | ||
|
||
checksum: | ||
disable: true | ||
|
||
builds: | ||
- binary: glance | ||
env: | ||
- CGO_ENABLED=0 | ||
goos: | ||
- linux | ||
- openbsd | ||
- freebsd | ||
- windows | ||
- darwin | ||
goarch: | ||
- amd64 | ||
- arm64 | ||
- arm | ||
- 386 | ||
goarm: | ||
- 7 | ||
ldflags: | ||
- -s -w -X github.com/glanceapp/glance/internal/glance.buildVersion={{ .Tag }} | ||
|
||
archives: | ||
- | ||
name_template: "glance-{{ .Os }}-{{ .Arch }}{{ with .Arm }}v{{ . }}{{ end }}" | ||
files: | ||
- nothing* | ||
format_overrides: | ||
- goos: windows | ||
format: zip | ||
|
||
dockers: | ||
- image_templates: | ||
- &amd64_image "{{ .ProjectName }}:{{ .Tag }}-amd64" | ||
build_flag_templates: | ||
- --platform=linux/amd64 | ||
goarch: amd64 | ||
use: buildx | ||
dockerfile: Dockerfile.goreleaser | ||
|
||
- image_templates: | ||
- &arm64v8_image "{{ .ProjectName }}:{{ .Tag }}-arm64" | ||
build_flag_templates: | ||
- --platform=linux/arm64 | ||
goarch: arm64 | ||
use: buildx | ||
dockerfile: Dockerfile.goreleaser | ||
|
||
- image_templates: | ||
- &arm64v7_image "{{ .ProjectName }}:{{ .Tag }}-arm64v7" | ||
build_flag_templates: | ||
- --platform=linux/arm64/v7 | ||
goarch: arm | ||
goarm: 7 | ||
use: buildx | ||
dockerfile: Dockerfile.goreleaser | ||
|
||
docker_manifests: | ||
- name_template: "{{ .ProjectName }}:{{ .Tag }}" | ||
image_templates: | ||
- *amd64_image | ||
- *arm64v8_image | ||
- *arm64v7_image | ||
- name_template: "{{ .ProjectName }}:latest" | ||
skip_push: auto | ||
image_templates: | ||
- *amd64_image | ||
- *arm64v8_image | ||
- *arm64v7_image |
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 |
---|---|---|
@@ -1,11 +1,13 @@ | ||
FROM alpine:3.20.2 | ||
FROM golang:1.22.5-alpine3.20 AS builder | ||
|
||
ARG TARGETOS | ||
ARG TARGETARCH | ||
ARG TARGETVARIANT | ||
WORKDIR /app | ||
COPY . /app | ||
RUN CGO_ENABLED=0 go build . | ||
|
||
FROM alpine:3.20 | ||
|
||
WORKDIR /app | ||
COPY build/glance-$TARGETOS-$TARGETARCH${TARGETVARIANT} /app/glance | ||
COPY --from=builder /app/glance . | ||
|
||
EXPOSE 8080/tcp | ||
ENTRYPOINT ["/app/glance"] |
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,8 @@ | ||
FROM alpine:3.20 | ||
|
||
WORKDIR /app | ||
COPY glance . | ||
|
||
EXPOSE 8080/tcp | ||
|
||
ENTRYPOINT ["/app/glance"] |
This file was deleted.
Oops, something went wrong.
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
Oops, something went wrong.