Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ci: deploy docker image; fix dryrun script #12

Merged
merged 1 commit into from
Aug 21, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@ jobs:
name: GoReleaser
runs-on: ubuntu-latest
steps:
- name: Setup Task
uses: arduino/setup-task@v2

- name: Setup Go
uses: actions/setup-go@v5
with:
Expand All @@ -22,10 +25,10 @@ jobs:
uses: actions/checkout@v4

- name: GoReleaser Dry Run
run: ./scripts/goreleaser-dry-run.sh
run: task goreleaser:dryrun

- name: Setup Environment
run: echo 'GITHUB_TOKEN=${{secrets.GH_PAT}}' > .release-env

- name: GoReleaser Release
run: ./scripts/goreleaser-release.sh
run: task goreleaser:release
19 changes: 19 additions & 0 deletions .goreleaser.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -115,3 +115,22 @@ changelog:
exclude:
- "^docs:"
- "^test:"

dockers:
- image_templates:
- "ghcr.io/broderick-westrope/tetrigo:latest"
- "ghcr.io/broderick-westrope/tetrigo:v{{ .Version }}"
ids: [tetrigo-linux-amd64]
goarch: amd64
build_flag_templates:
- --platform=linux/amd64
- --label=org.opencontainers.image.title={{ .ProjectName }}
- --label=org.opencontainers.image.description={{ .ProjectName }}
- --label=org.opencontainers.image.url=https://github.com/broderick-westrope/tetrigo
- --label=org.opencontainers.image.source=https://github.com/broderick-westrope/tetrigo
- --label=org.opencontainers.image.version=v{{ .Version }}
- --label=org.opencontainers.image.created={{ .Date }}
- --label=org.opencontainers.image.revision={{ .FullCommit }}
- --label=org.opencontainers.image.licenses=GPL-3.0
dockerfile: Dockerfile
use: buildx
11 changes: 11 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
FROM scratch
COPY tetrigo /usr/local/bin/tetrigo

# Expose data volume
VOLUME /data

# Expose ports
EXPOSE 53531/tcp

# Set the default command
ENTRYPOINT [ "/usr/local/bin/tetrigo" ]
2 changes: 1 addition & 1 deletion Taskfile.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ tasks:
goreleaser:dryrun:
desc: Releases the project
cmds:
- ./scripts/goreleaser/dry-run.sh
- ./scripts/goreleaser/dryrun.sh

goreleaser:release:
desc: Releases the project
Expand Down
File renamed without changes.
Loading