Skip to content

Commit

Permalink
Update create_api.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
sei-dupdyke authored Aug 26, 2024
1 parent 5b77b27 commit 44a9495
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions .github/workflows/create_api.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,14 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3

- name: Extract tag name # Extract tag name based on event type
id: tag_name
run: |
if [[ $GITHUB_EVENT_NAME == 'release' ]]; then
echo "##[set-output name=tag;]$(echo ${GITHUB_REF#refs/tags/})"
echo "tag=$(echo ${GITHUB_REF#refs/tags/})" >> $GITHUB_ENV
else
echo "##[set-output name=tag;]latest"
echo "tag=latest" >> $GITHUB_ENV
fi
shell: bash

Expand All @@ -30,7 +31,9 @@ jobs:
- name: Build and push Docker images
uses: docker/build-push-action@v2
with:
tags: dustinupdyke/ghosts:${{ steps.tag_name.outputs.tag }}
tags: |
dustinupdyke/ghosts:${{ env.tag }}
dustinupdyke/ghosts:latest
push: true
context: src/.
file: ./src/Dockerfile-api
Expand Down

0 comments on commit 44a9495

Please sign in to comment.