Skip to content

Commit

Permalink
action update
Browse files Browse the repository at this point in the history
  • Loading branch information
sei-dupdyke committed Jan 13, 2024
1 parent 449c452 commit 67e85a8
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,19 @@ jobs:
steps:
- uses: actions/checkout@v3

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

- name: Build and push Docker images
uses: docker/build-push-action@v2 # Updated to v2
uses: docker/build-push-action@v2
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
Expand Down

0 comments on commit 67e85a8

Please sign in to comment.