Skip to content

Commit

Permalink
Run Docker related Github Action only when pushing a tag to main branch
Browse files Browse the repository at this point in the history
  • Loading branch information
TBG-FR committed Aug 8, 2023
1 parent 6f3ad62 commit d8627db
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion .github/workflows/docker-image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,9 @@ jobs:
runs-on: ubuntu-latest

# Execute only for branch 'main'
if: github.ref == 'refs/heads/main'
# @see https://stackoverflow.com/a/66463380/8179249 (comments)
# @see https://stackoverflow.com/a/74690436/8179249 (answer)
if: endsWith(github.event.base_ref, 'main') == true

# Sets the permissions granted to the GITHUB_TOKEN for the actions in this job.
permissions:
Expand Down

0 comments on commit d8627db

Please sign in to comment.