Skip to content

Commit

Permalink
ci: deploy docker image; fix dryrun script (#12)
Browse files Browse the repository at this point in the history
  • Loading branch information
Broderick-Westrope authored Aug 21, 2024
1 parent f59b998 commit 963fc4c
Show file tree
Hide file tree
Showing 5 changed files with 36 additions and 3 deletions.
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.

0 comments on commit 963fc4c

Please sign in to comment.