Skip to content

Commit

Permalink
Update Docker image workflow to trigger on release events
Browse files Browse the repository at this point in the history
  • Loading branch information
ashaffah committed Feb 22, 2024
1 parent 7bf499b commit 1caec21
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions .github/workflows/docker-image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@ name: Build and Push Docker Image

on:
push:
branches:
- main
release:
types:
- created
branches:
- main

jobs:
build-and-push:
Expand Down Expand Up @@ -34,7 +34,8 @@ jobs:
- name: Set previous version
run: |
if git rev-parse --verify "refs/tags/*" >/dev/null 2>&1; then
echo "PREVIOUS_VERSION=$(git describe --tags --abbrev=0)" >> $GITHUB_ENV
PREVIOUS_VERSION=$(git describe --tags --abbrev=0)
echo "PREVIOUS_VERSION=$PREVIOUS_VERSION" >> $GITHUB_ENV
else
echo "PREVIOUS_VERSION=none" >> $GITHUB_ENV
fi
Expand Down

0 comments on commit 1caec21

Please sign in to comment.