Add release process
All checks were successful
Docker Build and Publish / build (push) Successful in 6s
Docker Build and Publish / build (release) Successful in 7s

This commit is contained in:
Tanishq Dubey 2024-11-05 23:49:09 -05:00
parent 05a184fcf7
commit 07725c99b4
2 changed files with 16 additions and 6 deletions

View File

@ -3,9 +3,11 @@ name: Docker Build and Publish
on:
push:
branches: [ main ]
tags: [ 'v*' ]
tags: [ 'v*.*.*' ]
pull_request:
branches: [ main ]
release:
types: [published]
jobs:
build:
@ -20,11 +22,11 @@ jobs:
with:
images: git.dws.rip/${{ github.repository }}
tags: |
type=ref,event=branch
type=raw,value=latest,enable=${{ github.ref == 'refs/heads/main' }}
type=semver,pattern={{version}},enable=${{ startsWith(github.ref, 'refs/tags/v') }}
type=semver,pattern={{major}}.{{minor}},enable=${{ startsWith(github.ref, 'refs/tags/v') }}
type=sha,format=long
type=ref,event=pr
type=semver,pattern={{version}}
type=semver,pattern={{major}}.{{minor}}
type=sha
- name: Login to Gitea Container Registry
uses: docker/login-action@v2

View File

@ -114,4 +114,12 @@ spectra/
- `FLASK_ENV`: Set to 'production' in production
- `WORKERS`: Number of Gunicorn workers (default: 4)
- `PORT`: Override default port (default: 5000)
- `PORT`: Override default port (default: 5000)
## Release Process
To create a release:
- Create and push a tag: `git tag v1.0.0 && git push origin v1.0.0`
- Create a release in Gitea UI using that tag
- The workflow will build and push the Docker image with appropriate version tags
- The Docker image will be available at: `git.dws.rip/your-repo/image:v1.0.0`