Skip to content

Commit

Permalink
Updated dockerfile and add the image version
Browse files Browse the repository at this point in the history
  • Loading branch information
BanulaKumarage committed Feb 12, 2024
1 parent 84ae4ac commit c07ead8
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 2 deletions.
11 changes: 9 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,20 @@ jobs:
uses: actions/checkout@v2
with:
token: ${{ secrets.PAT }}

- name: Log in to the Docker hub
run: docker login -u ${{secrets.DOCKER_USER}} -p ${{secrets.DOCKER_PASS}}

- name: Get file version
id: get-version
run: |
VERSION=$(cat image-captioning/version.txt)
echo "File version: $VERSION"
echo "::set-output name=version::$VERSION"
- name: Build and push Docker image
uses: docker/build-push-action@ad44023a93711e3deb337508980b4b5e9bcdc5dc
with:
push: false
tags: image-captioning-fed-server:latest
tags: image-captioning-fed-server:${{ steps.get-version.outputs.version }}
github-token : ${{ secrets.PAT }}
2 changes: 2 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ COPY image-captioning/requirements.txt .
# Install dependencies
RUN pip install --no-cache-dir -r requirements.txt

COPY . .

# # Stage 2: Runtime environment
# FROM python:3.9-slim

Expand Down
1 change: 1 addition & 0 deletions image-captioning/version.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
v1.0.0-beta

0 comments on commit c07ead8

Please sign in to comment.