Skip to content

Commit

Permalink
in step if for skipping if not main
Browse files Browse the repository at this point in the history
  • Loading branch information
Axel Schwab committed Dec 1, 2024
1 parent c3f55fa commit bfc93ac
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion .github/workflows/pipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,11 @@ jobs:
VERSION=$(cat VERSION | tr -d ' \t\n\r')
cd docker
docker build . -t ${{ vars.DOCKER_HUB_USERNAME }}/backup:${VERSION}
- name: skip if not main
if: contains('refs/heads/main', github.ref)
run: |
echo "skipping"
exit 0
- name: Login to Docker Hub
uses: docker/login-action@v3
with:
Expand All @@ -41,7 +46,7 @@ jobs:
username: ${{ vars.DOCKER_HUB_USERNAME }}

publish-dockerhub-description:
if: contains('refs/heads/master', github.ref)
if: contains('refs/heads/main', github.ref)
needs:
- publish-docker-image
runs-on: ubuntu-latest
Expand Down

0 comments on commit bfc93ac

Please sign in to comment.