Skip to content
This repository was archived by the owner on Jan 24, 2025. It is now read-only.

Commit 1a2a396

Browse files
committed
Initial commit
1 parent 5eb36bf commit 1a2a396

File tree

15 files changed

+402
-0
lines changed

15 files changed

+402
-0
lines changed

.envrc.dist

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
export SERVER_API_KEY=""
2+
export IFRAMELY_API_KEY=""

.github/workflows/build.yml

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
name: build
2+
3+
on:
4+
pull_request:
5+
push:
6+
branches:
7+
- '*'
8+
tags-ignore:
9+
- '*'
10+
11+
jobs:
12+
test:
13+
runs-on: ubuntu-latest
14+
steps:
15+
- name: Checkout
16+
uses: actions/checkout@v4
17+
18+
- name: Set up Go
19+
uses: actions/setup-go@v5
20+
with:
21+
go-version: 1.23
22+
23+
- name: Build
24+
run: go build
25+
26+
- name: Run tests
27+
run: go test -v ./...
28+

.github/workflows/release.yml

Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
name: release
2+
3+
on:
4+
push:
5+
tags:
6+
- 'v*.*.*'
7+
8+
jobs:
9+
test:
10+
runs-on: ubuntu-latest
11+
steps:
12+
- name: Checkout
13+
uses: actions/checkout@v4
14+
15+
- name: Set up Go
16+
uses: actions/setup-go@v5
17+
with:
18+
go-version: 1.23
19+
20+
- name: Build
21+
run: go build
22+
23+
- name: Run tests
24+
run: go test -v ./...
25+
26+
release:
27+
runs-on: ubuntu-latest
28+
needs: test
29+
steps:
30+
- name: Checkout
31+
uses: actions/checkout@v4
32+
with:
33+
fetch-depth: 0
34+
35+
- name: Set up Go
36+
uses: actions/setup-go@v5
37+
with:
38+
go-version: 1.23
39+
40+
- name: Set up QEMU
41+
uses: docker/setup-qemu-action@v3
42+
43+
- name: Set up Docker Buildx
44+
uses: docker/setup-buildx-action@v3
45+
46+
- name: Login to GitHub Container Registry
47+
uses: docker/login-action@v3
48+
with:
49+
registry: ghcr.io
50+
username: ${{ github.actor }}
51+
password: ${{ secrets.GITHUB_TOKEN }}
52+
53+
- name: Run GoReleaser
54+
uses: goreleaser/goreleaser-action@v5
55+
with:
56+
distribution: goreleaser
57+
version: latest
58+
args: release --clean
59+
env:
60+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

.gitignore

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
.envrc
2+
dist
3+
4+
### Go template
5+
# If you prefer the allow list template instead of the deny list, see community template:
6+
# https://github.com/github/gitignore/blob/main/community/Golang/Go.AllowList.gitignore
7+
#
8+
# Binaries for programs and plugins
9+
*.exe
10+
*.exe~
11+
*.dll
12+
*.so
13+
*.dylib
14+
15+
# Test binary, built with `go test -c`
16+
*.test
17+
18+
# Output of the go coverage tool, specifically when used with LiteIDE
19+
*.out
20+
21+
# Dependency directories (remove the comment below to include it)
22+
# vendor/
23+
24+
# Go workspace file
25+
go.work
26+

.golangci.yml

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
linters-settings:
2+
govet:
3+
enable-all: true
4+
disable:
5+
- fieldalignment
6+
7+
sloglint:
8+
# Enforce not mixing key-value pairs and attributes.
9+
# Default: true
10+
no-mixed-args: false
11+
# Enforce using key-value pairs only (overrides no-mixed-args, incompatible with attr-only).
12+
# Default: false
13+
kv-only: true
14+
# Enforce using attributes only (overrides no-mixed-args, incompatible with kv-only).
15+
# Default: false
16+
attr-only: true
17+
# Enforce using methods that accept a context.
18+
# Default: false
19+
context: all
20+
# Enforce using static values for log messages.
21+
# Default: false
22+
static-msg: true
23+
# Enforce using constants instead of raw keys.
24+
# Default: false
25+
no-raw-keys: true
26+
# Enforce a single key naming convention.
27+
# Values: snake, kebab, camel, pascal
28+
# Default: ""
29+
key-naming-case: snake
30+
# Enforce putting arguments on separate lines.
31+
# Default: false
32+
args-on-sep-lines: true

.goreleaser.yml

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
before:
2+
hooks:
3+
- go mod tidy
4+
builds:
5+
- env:
6+
- CGO_ENABLED=0
7+
binary: iframely-server
8+
ldflags:
9+
- -s -w
10+
goos:
11+
- darwin
12+
- linux
13+
goarch:
14+
- amd64
15+
- arm64
16+
checksum:
17+
name_template: 'checksums.txt'
18+
dockers:
19+
- dockerfile: Dockerfile
20+
use: buildx
21+
build_flag_templates:
22+
- "--platform=linux/amd64"
23+
- "--pull"
24+
image_templates:
25+
- "ghcr.io/emgag/iframely-server:{{ .Tag }}-amd64"
26+
goos: linux
27+
goarch: amd64
28+
ids:
29+
- iframely-server
30+
- dockerfile: Dockerfile
31+
use: buildx
32+
build_flag_templates:
33+
- "--platform=linux/arm64"
34+
- "--pull"
35+
image_templates:
36+
- "ghcr.io/emgag/iframely-server:{{ .Tag }}-arm64"
37+
goos: linux
38+
goarch: arm64
39+
ids:
40+
- iframely-server
41+
docker_manifests:
42+
- name_template: ghcr.io/emgag/iframely-server:{{ .Tag }}
43+
image_templates:
44+
- "ghcr.io/emgag/iframely-server:{{ .Tag }}-amd64"
45+
- "ghcr.io/emgag/iframely-server:{{ .Tag }}-arm64"
46+
- name_template: ghcr.io/emgag/iframely-server:latest
47+
image_templates:
48+
- "ghcr.io/emgag/iframely-server:{{ .Tag }}-amd64"
49+
- "ghcr.io/emgag/iframely-server:{{ .Tag }}-arm64"
50+

.idea/.gitignore

Lines changed: 8 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/iframely-server.iml

Lines changed: 9 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/modules.xml

Lines changed: 8 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/vcs.xml

Lines changed: 6 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)