-
Notifications
You must be signed in to change notification settings - Fork 6
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 drop-fcm-legacy
- Loading branch information
Showing
11 changed files
with
209 additions
and
104 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
name: Release | ||
on: | ||
push: | ||
branches: | ||
- "!**/*" | ||
tags: | ||
- "v*" | ||
|
||
permissions: | ||
contents: write | ||
packages: write | ||
|
||
jobs: | ||
release: | ||
name: Release | ||
runs-on: ubuntu-22.04 | ||
steps: | ||
- name: Set up Go | ||
uses: actions/setup-go@v4 | ||
with: | ||
go-version: "1.21" | ||
|
||
- name: Check out code into the Go module directory | ||
uses: actions/checkout@v4 | ||
|
||
- name: setup QEMU | ||
uses: docker/setup-qemu-action@v3 | ||
|
||
- name: setup Docker Buildx | ||
uses: docker/setup-buildx-action@v3 | ||
|
||
- name: Run GoReleaser | ||
uses: goreleaser/goreleaser-action@v4 | ||
with: | ||
version: latest | ||
args: release | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- name: Docker Login | ||
uses: docker/login-action@v3 | ||
with: | ||
username: fujiwara | ||
password: ${{ secrets.DOCKER_TOKEN }} | ||
|
||
- name: Docker Login | ||
uses: docker/login-action@v3 | ||
with: | ||
registry: ghcr.io | ||
username: $GITHUB_ACTOR | ||
password: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- name: docker | ||
run: | | ||
PATH=~/bin:$PATH make docker-push |
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,24 @@ | ||
name: test | ||
on: [push] | ||
jobs: | ||
test: | ||
strategy: | ||
matrix: | ||
go: | ||
- "1.21" | ||
- "1.20" | ||
name: Build | ||
runs-on: ubuntu-22.04 | ||
steps: | ||
- name: Set up Go | ||
uses: actions/setup-go@v4 | ||
with: | ||
go-version: ${{ matrix.go }} | ||
id: go | ||
|
||
- name: Check out code into the Go module directory | ||
uses: actions/checkout@v4 | ||
|
||
- name: Build & Test | ||
run: | | ||
make test |
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 |
---|---|---|
|
@@ -30,5 +30,6 @@ _testmain.go | |
/apnsmock | ||
/test/server* | ||
/pkg | ||
/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.yaml file with some sane defaults. | ||
# Make sure to check the documentation at http://goreleaser.com | ||
before: | ||
hooks: | ||
- go mod download | ||
builds: | ||
- env: | ||
- CGO_ENABLED=0 | ||
main: ./cmd/gunfish/ | ||
binary: gunfish | ||
ldflags: | ||
- -s -w | ||
- -X main.version=v{{.Version}} | ||
goos: | ||
- darwin | ||
- linux | ||
goarch: | ||
- amd64 | ||
- arm64 | ||
archives: | ||
- name_template: "{{.ProjectName}}_v{{.Version}}_{{.Os}}_{{.Arch}}" | ||
|
||
release: | ||
prerelease: "true" | ||
checksum: | ||
name_template: "checksums.txt" | ||
changelog: | ||
sort: asc | ||
filters: | ||
exclude: | ||
- "^docs:" | ||
- "^test:" |
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
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
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,16 +1,10 @@ | ||
FROM alpine:3.9 | ||
FROM alpine:3.18 | ||
LABEL maintainer "FUJIWARA Shunichiro <[email protected]>" | ||
|
||
ARG version | ||
|
||
RUN apk --no-cache add unzip curl && \ | ||
mkdir -p /etc/gunfish /opt/gunfish && \ | ||
curl -sL https://github.com/kayac/Gunfish/releases/download/${version}/gunfish-${version}-linux-amd64.zip > /tmp/gunfish-${version}-linux-amd64.zip && \ | ||
cd /tmp && \ | ||
unzip gunfish-${version}-linux-amd64.zip && \ | ||
install gunfish-${version}-linux-amd64 /usr/bin/gunfish && \ | ||
rm -f /tmp/gunfish* | ||
|
||
ARG VERSION | ||
ARG TARGETARCH | ||
ADD dist/Gunfish_linux_${TARGETARCH}/gunfish /usr/local/bin/gunfish | ||
EXPOSE 8003 | ||
WORKDIR /opt/gunfish | ||
|
||
ENTRYPOINT ["/usr/bin/gunfish"] | ||
ENTRYPOINT ["/usr/local/bin/gunfish"] |
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.