Skip to content

Commit

Permalink
Adding a VERSION file
Browse files Browse the repository at this point in the history
  • Loading branch information
spaquet committed Jan 16, 2024
1 parent bb7faf3 commit 52e1984
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
11 changes: 9 additions & 2 deletions .github/workflows/docker-build.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name: Build and Push Docker Image

on:
pull_request:
push:
branches:
- main

Expand All @@ -22,10 +22,17 @@ jobs:
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Extract Version
id: version
run: |
MAJOR_MINOR=`cat VERSION` # Replace with your way to extract version
BUILD_NUMBER=${GITHUB_RUN_NUMBER} # Or use ${GITHUB_SHA::8} for commit SHA
echo "VERSION_TAG=${MAJOR_MINOR}.${BUILD_NUMBER}" >> $GITHUB_ENV
- name: Build and Push Docker Image
uses: docker/build-push-action@v2
with:
context: .
file: ./Dockerfile
push: true
tags: ghcr.io/${{ github.repository_owner }}/your-image-name:latest
tags: ghcr.io/${{ github.repository_owner }}/your-image-name:${{ env.VERSION_TAG }}
1 change: 1 addition & 0 deletions VERSION
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
0.9

0 comments on commit 52e1984

Please sign in to comment.