Skip to content

Commit

Permalink
Merge pull request #45 from ThinkThinkAI/dockerhub_versioning
Browse files Browse the repository at this point in the history
add versioning
  • Loading branch information
rootedbox authored Sep 11, 2024
2 parents 1e3e033 + dfbc989 commit c94916f
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 2 deletions.
23 changes: 21 additions & 2 deletions .github/workflows/publish-to-dockerhub.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Publish Docker Image
name: Publish Docker Image and Create Release

on:
push:
Expand Down Expand Up @@ -27,10 +27,29 @@ jobs:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}

- name: Extract version
id: vars
run: |
VERSION=$(cat VERSION) # Assumes you have a VERSION file in your repo
echo "VERSION=$VERSION" >> $GITHUB_ENV
- name: Build and push Docker image
uses: docker/build-push-action@v3
with:
context: .
push: true
platforms: linux/amd64,linux/arm/v7,linux/arm64
tags: thinkthinkai/think_db:latest
tags: thinkthinkai/think_db:latest,thinkthinkai/think_db:${{ env.VERSION }}

- name: Create GitHub Release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ env.VERSION }}
release_name: Release ${{ env.VERSION }}
body: |
New release ${{ env.VERSION }} is out!
draft: false
prerelease: false
1 change: 1 addition & 0 deletions VERSION
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
1.0.0-alpha

0 comments on commit c94916f

Please sign in to comment.