ci: update pipeline to build binaries and create releases
All checks were successful
build and deploy kleinTodo / build (push) Successful in 1m11s
All checks were successful
build and deploy kleinTodo / build (push) Successful in 1m11s
Co-authored-by: Junie <junie@jetbrains.com>
This commit is contained in:
parent
9de1cd6172
commit
483819e423
22
.github/workflows/Deploy-docker.yml
vendored
22
.github/workflows/Deploy-docker.yml
vendored
@ -3,6 +3,7 @@ name: build and deploy kleinTodo
|
||||
on:
|
||||
push:
|
||||
branches: [ "main" ]
|
||||
tags: [ "v*" ]
|
||||
pull_request:
|
||||
branches: [ "main" ]
|
||||
|
||||
@ -14,9 +15,30 @@ jobs:
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
|
||||
- name: Set up Go
|
||||
uses: actions/setup-go@v4
|
||||
with:
|
||||
go-version: '1.25.x'
|
||||
|
||||
- name: Build binaries
|
||||
run: |
|
||||
chmod +x build.sh
|
||||
./build.sh
|
||||
|
||||
- name: Build the Docker image
|
||||
run: docker build -t gitea.kleinsense.nl/dariusklein/klein_todo:latest -f server/Dockerfile .
|
||||
|
||||
- name: Docker login
|
||||
run: docker login gitea.kleinsense.nl -p ${{secrets.docker_password}} -u ${{secrets.docker_username}}
|
||||
|
||||
- name: Docker push
|
||||
run: docker push gitea.kleinsense.nl/dariusklein/klein_todo:latest
|
||||
|
||||
- name: Create Release and Upload Binaries
|
||||
if: startsWith(github.ref, 'refs/tags/')
|
||||
uses: https://gitea.com/actions/gitea-release-action@v1
|
||||
with:
|
||||
files: |-
|
||||
bin/server
|
||||
bin/todo
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user