Skip to content

Commit

Permalink
fix?
Browse files Browse the repository at this point in the history
  • Loading branch information
zeeket committed May 26, 2024
1 parent 309ad2e commit 90a2ab9
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions .github/workflows/create-publish-docker-image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,16 @@ jobs:
- name: Checkout repository
uses: actions/checkout@v3

- name: Exit if not on main branch
if: endsWith(github.event.base_ref, 'main') == false
run: exit -1
- name: Get current branch and exit if not main
run: |
raw=$(git branch -r --contains ${{ github.ref }})
branch=${raw##*/}
echo "{name}=branch" >> $GITHUB_OUTPUT
echo "Branch is $branch."
if [ "$branch" != "main" ]; then
echo "Not on main branch, exiting."
exit 0
fi
- name: Log in to the Container registry
uses: docker/login-action@v2
Expand Down

0 comments on commit 90a2ab9

Please sign in to comment.