Skip to content

Commit

Permalink
tags: [ "*" ]
Browse files Browse the repository at this point in the history
  • Loading branch information
bsamadi committed Jan 1, 2024
1 parent b7357fd commit 91f100a
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion .github/workflows/docker-image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ name: Docker Image CI
on:
push:
branches: [ "main" ]
tags: [ "*" ]
pull_request:
branches: [ "main" ]

Expand All @@ -22,7 +23,13 @@ jobs:
password: ${{ secrets.GHCR_TOKEN }}
- name: Generate Docker tag
id: docker_tag
run: echo "::set-output name=tag::$(echo 'docker.pkg.github.com/${{ github.repository }}/openai-api-server:latest' | awk '{print tolower($0)}')"
run: |
if [[ "${GITHUB_REF}" == "refs/heads/main" ]]; then
TAG_NAME="latest"
else
TAG_NAME=${GITHUB_REF#refs/tags/}
fi
echo "::set-output name=tag::$(echo "docker.pkg.github.com/${{ github.repository }}/openai-api-server:$TAG_NAME" | awk '{print tolower($0)}')"
- name: Build and push Docker images
uses: docker/build-push-action@v2
with:
Expand Down

0 comments on commit 91f100a

Please sign in to comment.