Add docker to goreleaser
This commit is contained in:
parent
bc32a09a5d
commit
eabf8befdc
|
@ -1,3 +1,9 @@
|
||||||
|
project_name: ytdl-web
|
||||||
|
env:
|
||||||
|
- BASE_PKG=go.fifitido.net/ytdl-web
|
||||||
|
gitea_urls:
|
||||||
|
api: https://git.fifitido.net/api/v1
|
||||||
|
download: https://git.fifitido.net
|
||||||
before:
|
before:
|
||||||
hooks:
|
hooks:
|
||||||
- go mod tidy
|
- go mod tidy
|
||||||
|
@ -9,11 +15,13 @@ builds:
|
||||||
- windows
|
- windows
|
||||||
- darwin
|
- darwin
|
||||||
ldflags:
|
ldflags:
|
||||||
- -X go.fifitido.net/ytdl-web/version.Version={{.Version}}
|
- -X {{ .Env.BASE_PKG }}/version.Version={{.Version}}
|
||||||
- -X go.fifitido.net/ytdl-web/version.Build={{.Commit}}
|
- -X {{ .Env.BASE_PKG }}/version.Build={{.Commit}}
|
||||||
- -X go.fifitido.net/ytdl-web/version.BuildDate={{.Date}}
|
- -X {{ .Env.BASE_PKG }}/version.BuildDate={{.Date}}
|
||||||
- -X go.fifitido.net/ytdl-web/version.BuiltBy=goreleaser
|
- -X {{ .Env.BASE_PKG }}/version.BuiltBy=goreleaser
|
||||||
|
dockers:
|
||||||
|
- image_templates:
|
||||||
|
- git.fifitido.net/apps/{{.ProjectName}}
|
||||||
archives:
|
archives:
|
||||||
- format: tar.gz
|
- format: tar.gz
|
||||||
# this name template makes the OS and Arch compatible with the results of uname.
|
# this name template makes the OS and Arch compatible with the results of uname.
|
||||||
|
@ -38,10 +46,6 @@ changelog:
|
||||||
exclude:
|
exclude:
|
||||||
- "^docs:"
|
- "^docs:"
|
||||||
- "^test:"
|
- "^test:"
|
||||||
|
|
||||||
gitea_urls:
|
|
||||||
api: https://git.fifitido.net/api/v1
|
|
||||||
download: https://git.fifitido.net
|
|
||||||
# The lines beneath this are called `modelines`. See `:help modeline`
|
# The lines beneath this are called `modelines`. See `:help modeline`
|
||||||
# Feel free to remove those if you don't want/use them.
|
# Feel free to remove those if you don't want/use them.
|
||||||
# yaml-language-server: $schema=https://goreleaser.com/static/schema.json
|
# yaml-language-server: $schema=https://goreleaser.com/static/schema.json
|
||||||
|
|
23
README.md
23
README.md
|
@ -54,27 +54,6 @@ Steps:
|
||||||
task release
|
task release
|
||||||
```
|
```
|
||||||
|
|
||||||
## Publishing Docker Image
|
|
||||||
|
|
||||||
Prerequisites:
|
|
||||||
|
|
||||||
- [docker](https://docs.docker.com/engine/install/)
|
|
||||||
- [task cli](https://taskfile.dev/installation/)
|
|
||||||
|
|
||||||
Steps:
|
|
||||||
|
|
||||||
1. Login to the container registry
|
|
||||||
|
|
||||||
```sh
|
|
||||||
docker login git.fifitido.net
|
|
||||||
```
|
|
||||||
|
|
||||||
2. Publish the container image
|
|
||||||
|
|
||||||
```sh
|
|
||||||
task docker:publish
|
|
||||||
```
|
|
||||||
|
|
||||||
## Publishing Chart
|
## Publishing Chart
|
||||||
|
|
||||||
Prerequisites:
|
Prerequisites:
|
||||||
|
@ -94,5 +73,5 @@ helm repo add --username {username} --password {password} gitea-apps https://git
|
||||||
2. Publish the chart
|
2. Publish the chart
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
task chart:publish
|
task publish-chart
|
||||||
```
|
```
|
||||||
|
|
10
Taskfile.yml
10
Taskfile.yml
|
@ -25,12 +25,4 @@ tasks:
|
||||||
-o {{.OUT}} .
|
-o {{.OUT}} .
|
||||||
dev: air
|
dev: air
|
||||||
release: goreleaser release
|
release: goreleaser release
|
||||||
|
publish-chart: helm cm-push charts/ytdl-web/ gitea-apps
|
||||||
chart:publish: helm cm-push charts/ytdl-web/ gitea-apps
|
|
||||||
|
|
||||||
docker:build: docker build -t {{.DOCKER_IMAGE}}:{{.DOCKER_IMAGE_TAG}} .
|
|
||||||
docker:publish:
|
|
||||||
deps:
|
|
||||||
- docker:build
|
|
||||||
cmds:
|
|
||||||
- docker push {{.DOCKER_IMAGE}}:{{.DOCKER_IMAGE_TAG}}
|
|
||||||
|
|
Loading…
Reference in New Issue