diff --git a/.github/workflows/docker-merge-tags.yml b/.github/workflows/docker-merge-tags.yml index a5bf9acc..356dbde2 100644 --- a/.github/workflows/docker-merge-tags.yml +++ b/.github/workflows/docker-merge-tags.yml @@ -56,13 +56,13 @@ jobs: shell: bash - name: Login to Docker Hub 🔐 - if: github.ref == 'refs/heads/main' || github.event_name == 'schedule' + if: github.repository == 'jupyter/docker-stacks' && (github.ref == 'refs/heads/main' || github.event_name == 'schedule') uses: docker/login-action@f4ef78c080cd8ba55a85445d5b36e214a81df20a # v2.1.0 with: username: ${{ secrets.DOCKERHUB_USERNAME }} password: ${{ secrets.DOCKERHUB_TOKEN }} - name: Merge tags for the images 🔀 - if: github.ref == 'refs/heads/main' || github.event_name == 'schedule' + if: github.repository == 'jupyter/docker-stacks' && (github.ref == 'refs/heads/main' || github.event_name == 'schedule') run: python3 -m tagging.merge_tags --short-image-name ${{ inputs.image }} --tags-dir /tmp/tags/ shell: bash diff --git a/.github/workflows/docker-tag-manifest-push.yml b/.github/workflows/docker-tag-manifest-push.yml index 5078d3bc..b52c3db7 100644 --- a/.github/workflows/docker-tag-manifest-push.yml +++ b/.github/workflows/docker-tag-manifest-push.yml @@ -38,7 +38,7 @@ jobs: platform: ${{ inputs.platform }} - name: Login to Docker Hub 🔐 - if: github.ref == 'refs/heads/main' || github.event_name == 'schedule' + if: github.repository == 'jupyter/docker-stacks' && (github.ref == 'refs/heads/main' || github.event_name == 'schedule') uses: docker/login-action@f4ef78c080cd8ba55a85445d5b36e214a81df20a # v2.1.0 with: username: ${{ secrets.DOCKERHUB_USERNAME }} @@ -53,6 +53,6 @@ jobs: run: python3 -m tagging.apply_tags --short-image-name ${{ inputs.image }} --tags-dir /tmp/tags/ --platform ${{ inputs.platform }} --owner ${{ env.OWNER }} - name: Push Images to Docker Hub 📤 - if: github.ref == 'refs/heads/main' || github.event_name == 'schedule' + if: github.repository == 'jupyter/docker-stacks' && (github.ref == 'refs/heads/main' || github.event_name == 'schedule') run: docker push --all-tags ${{ env.OWNER }}/${{ inputs.image }} shell: bash diff --git a/.github/workflows/docker-wiki-update.yml b/.github/workflows/docker-wiki-update.yml index 032baaaa..a05b93c7 100644 --- a/.github/workflows/docker-wiki-update.yml +++ b/.github/workflows/docker-wiki-update.yml @@ -39,7 +39,7 @@ jobs: shell: bash - name: Push Wiki to GitHub 📤 - if: github.ref == 'refs/heads/main' || github.event_name == 'schedule' + if: github.repository == 'jupyter/docker-stacks' && (github.ref == 'refs/heads/main' || github.event_name == 'schedule') uses: stefanzweifel/git-auto-commit-action@3ea6ae190baf489ba007f7c92608f33ce20ef04a # v4.16.0 with: commit_message: "Automated wiki publish for ${{ github.sha }}" diff --git a/.github/workflows/sphinx.yml b/.github/workflows/sphinx.yml index 9266a640..ec1d5a61 100644 --- a/.github/workflows/sphinx.yml +++ b/.github/workflows/sphinx.yml @@ -25,7 +25,6 @@ on: jobs: build-docs: name: Build Sphinx Documentation - if: github.event_name != 'schedule' || (github.event_name == 'schedule' && github.repository == 'jupyter/docker-stacks') runs-on: ubuntu-latest permissions: contents: write