Skip to content

Commit

Permalink
Build all workflows in my fork (jupyter#2012)
Browse files Browse the repository at this point in the history
* Build all workflows in my fork

* Build contributed recipes only in jupyter, because I don't have aarch64 runners
  • Loading branch information
mathbunnyru authored Oct 20, 2023
1 parent a55db53 commit 7de6ac7
Show file tree
Hide file tree
Showing 6 changed files with 13 additions and 8 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/contributed-recipes.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ jobs:
test-recipes:
runs-on: ${{ matrix.runsOn }}
needs: generate-matrix
if: github.repository == 'jupyter/docker-stacks'
if: github.repository_owner == 'jupyter'

steps:
- name: Checkout Repo ⚡️
Expand Down
5 changes: 3 additions & 2 deletions .github/workflows/docker-merge-tags.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ name: Download images tags from GitHub artifacts and create multi-platform manif

env:
OWNER: ${{ github.repository_owner }}
PUSH_TO_REGISTRY: (github.repository_owner == 'jupyter' || github.repository_owner == 'mathbunnyru') && (github.ref == 'refs/heads/main' || github.event_name == 'schedule')

on:
workflow_call:
Expand Down Expand Up @@ -47,13 +48,13 @@ jobs:
shell: bash

- name: Login to Registry 🔐
if: github.repository == 'jupyter/docker-stacks' && (github.ref == 'refs/heads/main' || github.event_name == 'schedule')
if: env.PUSH_TO_REGISTRY
uses: docker/login-action@343f7c4344506bcbf9b4de18042ae17996df046d # v3.0.0
with:
username: ${{ secrets.REGISTRY_USERNAME }}
password: ${{ secrets.REGISTRY_TOKEN }}

- name: Merge tags for the images 🔀
if: github.repository == 'jupyter/docker-stacks' && (github.ref == 'refs/heads/main' || github.event_name == 'schedule')
if: env.PUSH_TO_REGISTRY
run: python3 -m tagging.merge_tags --short-image-name ${{ inputs.image }} --tags-dir /tmp/jupyter/tags/
shell: bash
5 changes: 3 additions & 2 deletions .github/workflows/docker-tag-push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ name: Download Docker image and its tags from GitHub artifacts, apply them and p
env:
REGISTRY: docker.io
OWNER: ${{ github.repository_owner }}
PUSH_TO_REGISTRY: (github.repository_owner == 'jupyter' || github.repository_owner == 'mathbunnyru') && (github.ref == 'refs/heads/main' || github.event_name == 'schedule')

on:
workflow_call:
Expand Down Expand Up @@ -37,7 +38,7 @@ jobs:
platform: ${{ inputs.platform }}

- name: Login to Registry 🔐
if: github.repository == 'jupyter/docker-stacks' && (github.ref == 'refs/heads/main' || github.event_name == 'schedule')
if: env.PUSH_TO_REGISTRY
uses: docker/login-action@343f7c4344506bcbf9b4de18042ae17996df046d # v3.0.0
with:
username: ${{ secrets.REGISTRY_USERNAME }}
Expand All @@ -52,6 +53,6 @@ jobs:
run: python3 -m tagging.apply_tags --short-image-name ${{ inputs.image }} --tags-dir /tmp/jupyter/tags/ --platform ${{ inputs.platform }} --registry ${{ env.REGISTRY }} --owner ${{ env.OWNER }}

- name: Push Images to Registry 📤
if: github.repository == 'jupyter/docker-stacks' && (github.ref == 'refs/heads/main' || github.event_name == 'schedule')
if: env.PUSH_TO_REGISTRY
run: docker push --all-tags ${{ env.OWNER }}/${{ inputs.image }}
shell: bash
5 changes: 4 additions & 1 deletion .github/workflows/docker-wiki-update.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@ name: Download build manifests from GitHub artifacts and push them to GitHub wik
# We're doing everything in one workflow on purpose
# This way we make sure we don't access wiki pages from several jobs simultaneously

env:
PUSH_TO_REGISTRY: (github.repository_owner == 'jupyter' || github.repository_owner == 'mathbunnyru') && (github.ref == 'refs/heads/main' || github.event_name == 'schedule')

on:
workflow_call:

Expand Down Expand Up @@ -37,7 +40,7 @@ jobs:
shell: bash

- name: Push Wiki to GitHub 📤
if: github.repository == 'jupyter/docker-stacks' && (github.ref == 'refs/heads/main' || github.event_name == 'schedule')
if: env.PUSH_TO_REGISTRY
uses: stefanzweifel/git-auto-commit-action@8756aa072ef5b4a080af5dc8fef36c5d586e521d # v5.0.0
with:
commit_message: "Automated wiki publish for ${{ github.sha }}"
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/registry-overviews.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
update-overview:
runs-on: ubuntu-latest
name: update-overview (${{matrix.image}})
if: github.repository == 'jupyter/docker-stacks'
if: github.repository_owner == 'jupyter' || github.repository_owner == 'mathbunnyru'

steps:
- name: Checkout Repo ⚡️
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/sphinx.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ jobs:
build-docs:
permissions:
contents: write
if: github.repository == 'jupyter/docker-stacks' || github.event_name != 'schedule'
if: github.repository_owner == 'jupyter' || github.repository_owner == 'mathbunnyru' || github.event_name != 'schedule'
runs-on: ubuntu-latest

steps:
Expand Down

0 comments on commit 7de6ac7

Please sign in to comment.