From 07725c99b4cccd289558cc031287d843e39f9db9 Mon Sep 17 00:00:00 2001 From: Tanishq Dubey Date: Tue, 5 Nov 2024 23:49:09 -0500 Subject: [PATCH] Add release process --- .gitea/workflows/docker-publish.yml | 12 +++++++----- README.md | 10 +++++++++- 2 files changed, 16 insertions(+), 6 deletions(-) diff --git a/.gitea/workflows/docker-publish.yml b/.gitea/workflows/docker-publish.yml index e2ba0da..3c90a71 100644 --- a/.gitea/workflows/docker-publish.yml +++ b/.gitea/workflows/docker-publish.yml @@ -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 diff --git a/README.md b/README.md index cb8f427..2da3ddd 100644 --- a/README.md +++ b/README.md @@ -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) \ No newline at end of file +- `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`