Skip to content

Commit

Permalink
ci: only build Docker in the private repo
Browse files Browse the repository at this point in the history
  • Loading branch information
sorawee committed Oct 19, 2023
1 parent e68c42d commit 29ba247
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/docker-image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -99,16 +99,16 @@ jobs:
publish-docker:
needs: [wtns-test, configuration-test, main-test, misc-test]
name: "Publish Docker image to DockerHub"
if: github.event_name == 'push'
if: github.event_name == 'push' && github.repository == 'Veridise/picus-private'
runs-on: ubuntu-latest
steps:
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Login to DockerHub
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
username: ${{ secrets.SAAS_DOCKERHUB_USERNAME }}
password: ${{ secrets.SAAS_DOCKERHUB_TOKEN }}
- name: Build and push to DockerHub
uses: docker/build-push-action@v3
with:
Expand Down

0 comments on commit 29ba247

Please sign in to comment.