mirror of
https://github.com/jupyter/docker-stacks.git
synced 2025-10-12 20:42:57 +00:00
Make workflows work fine in forked repos (#1845)
This commit is contained in:
4
.github/workflows/docker-merge-tags.yml
vendored
4
.github/workflows/docker-merge-tags.yml
vendored
@@ -56,13 +56,13 @@ jobs:
|
|||||||
shell: bash
|
shell: bash
|
||||||
|
|
||||||
- name: Login to Docker Hub 🔐
|
- 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
|
uses: docker/login-action@f4ef78c080cd8ba55a85445d5b36e214a81df20a # v2.1.0
|
||||||
with:
|
with:
|
||||||
username: ${{ secrets.DOCKERHUB_USERNAME }}
|
username: ${{ secrets.DOCKERHUB_USERNAME }}
|
||||||
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
||||||
|
|
||||||
- name: Merge tags for the images 🔀
|
- 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/
|
run: python3 -m tagging.merge_tags --short-image-name ${{ inputs.image }} --tags-dir /tmp/tags/
|
||||||
shell: bash
|
shell: bash
|
||||||
|
@@ -38,7 +38,7 @@ jobs:
|
|||||||
platform: ${{ inputs.platform }}
|
platform: ${{ inputs.platform }}
|
||||||
|
|
||||||
- name: Login to Docker Hub 🔐
|
- 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
|
uses: docker/login-action@f4ef78c080cd8ba55a85445d5b36e214a81df20a # v2.1.0
|
||||||
with:
|
with:
|
||||||
username: ${{ secrets.DOCKERHUB_USERNAME }}
|
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 }}
|
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 📤
|
- 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 }}
|
run: docker push --all-tags ${{ env.OWNER }}/${{ inputs.image }}
|
||||||
shell: bash
|
shell: bash
|
||||||
|
2
.github/workflows/docker-wiki-update.yml
vendored
2
.github/workflows/docker-wiki-update.yml
vendored
@@ -39,7 +39,7 @@ jobs:
|
|||||||
shell: bash
|
shell: bash
|
||||||
|
|
||||||
- name: Push Wiki to GitHub 📤
|
- 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
|
uses: stefanzweifel/git-auto-commit-action@3ea6ae190baf489ba007f7c92608f33ce20ef04a # v4.16.0
|
||||||
with:
|
with:
|
||||||
commit_message: "Automated wiki publish for ${{ github.sha }}"
|
commit_message: "Automated wiki publish for ${{ github.sha }}"
|
||||||
|
1
.github/workflows/sphinx.yml
vendored
1
.github/workflows/sphinx.yml
vendored
@@ -25,7 +25,6 @@ on:
|
|||||||
jobs:
|
jobs:
|
||||||
build-docs:
|
build-docs:
|
||||||
name: Build Sphinx Documentation
|
name: Build Sphinx Documentation
|
||||||
if: github.event_name != 'schedule' || (github.event_name == 'schedule' && github.repository == 'jupyter/docker-stacks')
|
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
permissions:
|
permissions:
|
||||||
contents: write
|
contents: write
|
||||||
|
Reference in New Issue
Block a user