mirror of
https://github.com/jupyter/docker-stacks.git
synced 2025-10-16 06:22:56 +00:00
Unify multiline run statements in GitHub Actions steps (#2272)
This commit is contained in:
7
.github/actions/load-image/action.yml
vendored
7
.github/actions/load-image/action.yml
vendored
@@ -22,6 +22,11 @@ runs:
|
|||||||
path: /tmp/jupyter/images/
|
path: /tmp/jupyter/images/
|
||||||
- name: Load downloaded image to docker 📥
|
- name: Load downloaded image to docker 📥
|
||||||
run: |
|
run: |
|
||||||
zstd --uncompress --stdout --rm /tmp/jupyter/images/${{ inputs.image }}-${{ inputs.platform }}-${{ inputs.variant }}.tar.zst | docker load
|
zstd \
|
||||||
|
--uncompress \
|
||||||
|
--stdout \
|
||||||
|
--rm \
|
||||||
|
/tmp/jupyter/images/${{ inputs.image }}-${{ inputs.platform }}-${{ inputs.variant }}.tar.zst \
|
||||||
|
| docker load
|
||||||
docker image ls --all
|
docker image ls --all
|
||||||
shell: bash
|
shell: bash
|
||||||
|
60
.github/workflows/docker-build-test-upload.yml
vendored
60
.github/workflows/docker-build-test-upload.yml
vendored
@@ -63,13 +63,13 @@ jobs:
|
|||||||
shell: bash
|
shell: bash
|
||||||
|
|
||||||
- name: Build image 🛠
|
- name: Build image 🛠
|
||||||
run: >
|
run: |
|
||||||
docker build
|
docker build \
|
||||||
--rm --force-rm
|
--rm --force-rm \
|
||||||
--tag ${{ env.REGISTRY }}/${{ env.OWNER }}/${{ inputs.image }}
|
--tag ${{ env.REGISTRY }}/${{ env.OWNER }}/${{ inputs.image }} \
|
||||||
images/${{ inputs.image }}/${{ inputs.variant != 'default' && inputs.variant || '.' }}/
|
images/${{ inputs.image }}/${{ inputs.variant != 'default' && inputs.variant || '.' }}/ \
|
||||||
--build-arg REGISTRY=${{ env.REGISTRY }}
|
--build-arg REGISTRY=${{ env.REGISTRY }} \
|
||||||
--build-arg OWNER=${{ env.OWNER }}
|
--build-arg OWNER=${{ env.OWNER }}
|
||||||
env:
|
env:
|
||||||
DOCKER_BUILDKIT: 1
|
DOCKER_BUILDKIT: 1
|
||||||
# Full logs for CI build
|
# Full logs for CI build
|
||||||
@@ -77,13 +77,13 @@ jobs:
|
|||||||
shell: bash
|
shell: bash
|
||||||
|
|
||||||
- name: Write tags file 🏷
|
- name: Write tags file 🏷
|
||||||
run: >
|
run: |
|
||||||
python3 -m tagging.apps.write_tags_file
|
python3 -m tagging.apps.write_tags_file \
|
||||||
--registry ${{ env.REGISTRY }}
|
--registry ${{ env.REGISTRY }} \
|
||||||
--owner ${{ env.OWNER }}
|
--owner ${{ env.OWNER }} \
|
||||||
--image ${{ inputs.image }}
|
--image ${{ inputs.image }} \
|
||||||
--variant ${{ inputs.variant }}
|
--variant ${{ inputs.variant }} \
|
||||||
--tags-dir /tmp/jupyter/tags/
|
--tags-dir /tmp/jupyter/tags/
|
||||||
shell: bash
|
shell: bash
|
||||||
- name: Upload tags file 💾
|
- name: Upload tags file 💾
|
||||||
uses: actions/upload-artifact@v4
|
uses: actions/upload-artifact@v4
|
||||||
@@ -93,15 +93,15 @@ jobs:
|
|||||||
retention-days: 3
|
retention-days: 3
|
||||||
|
|
||||||
- name: Write manifest and build history file 🏷
|
- name: Write manifest and build history file 🏷
|
||||||
run: >
|
run: |
|
||||||
python3 -m tagging.apps.write_manifest
|
python3 -m tagging.apps.write_manifest \
|
||||||
--registry ${{ env.REGISTRY }}
|
--registry ${{ env.REGISTRY }} \
|
||||||
--owner ${{ env.OWNER }}
|
--owner ${{ env.OWNER }} \
|
||||||
--image ${{ inputs.image }}
|
--image ${{ inputs.image }} \
|
||||||
--variant ${{ inputs.variant }}
|
--variant ${{ inputs.variant }} \
|
||||||
--hist-lines-dir /tmp/jupyter/hist_lines/
|
--hist-lines-dir /tmp/jupyter/hist_lines/ \
|
||||||
--manifests-dir /tmp/jupyter/manifests/
|
--manifests-dir /tmp/jupyter/manifests/ \
|
||||||
--repository ${{ github.repository }}
|
--repository ${{ github.repository }}
|
||||||
shell: bash
|
shell: bash
|
||||||
- name: Upload manifest file 💾
|
- name: Upload manifest file 💾
|
||||||
uses: actions/upload-artifact@v4
|
uses: actions/upload-artifact@v4
|
||||||
@@ -119,7 +119,9 @@ jobs:
|
|||||||
- name: Save image as a tar for later use 💾
|
- name: Save image as a tar for later use 💾
|
||||||
run: |
|
run: |
|
||||||
mkdir -p /tmp/jupyter/images/
|
mkdir -p /tmp/jupyter/images/
|
||||||
docker save ${{ env.REGISTRY }}/${{ env.OWNER }}/${{ inputs.image }} | zstd > /tmp/jupyter/images/${{ inputs.image }}-${{ inputs.platform }}-${{ inputs.variant }}.tar.zst
|
docker save \
|
||||||
|
${{ env.REGISTRY }}/${{ env.OWNER }}/${{ inputs.image }} \
|
||||||
|
| zstd > /tmp/jupyter/images/${{ inputs.image }}-${{ inputs.platform }}-${{ inputs.variant }}.tar.zst
|
||||||
shell: bash
|
shell: bash
|
||||||
- name: Upload image as artifact 💾
|
- name: Upload image as artifact 💾
|
||||||
uses: actions/upload-artifact@v4
|
uses: actions/upload-artifact@v4
|
||||||
@@ -130,9 +132,9 @@ jobs:
|
|||||||
compression-level: 0
|
compression-level: 0
|
||||||
|
|
||||||
- name: Run tests ✅
|
- name: Run tests ✅
|
||||||
run: >
|
run: |
|
||||||
python3 -m tests.run_tests
|
python3 -m tests.run_tests \
|
||||||
--registry ${{ env.REGISTRY }}
|
--registry ${{ env.REGISTRY }} \
|
||||||
--owner ${{ env.OWNER }}
|
--owner ${{ env.OWNER }} \
|
||||||
--image ${{ inputs.image }}
|
--image ${{ inputs.image }}
|
||||||
shell: bash
|
shell: bash
|
||||||
|
16
.github/workflows/docker-tag-push.yml
vendored
16
.github/workflows/docker-tag-push.yml
vendored
@@ -61,14 +61,14 @@ jobs:
|
|||||||
name: ${{ inputs.image }}-${{ inputs.platform }}-${{ inputs.variant }}-tags
|
name: ${{ inputs.image }}-${{ inputs.platform }}-${{ inputs.variant }}-tags
|
||||||
path: /tmp/jupyter/tags/
|
path: /tmp/jupyter/tags/
|
||||||
- name: Apply tags to the loaded image 🏷
|
- name: Apply tags to the loaded image 🏷
|
||||||
run: >
|
run: |
|
||||||
python3 -m tagging.apps.apply_tags
|
python3 -m tagging.apps.apply_tags \
|
||||||
--registry ${{ env.REGISTRY }}
|
--registry ${{ env.REGISTRY }} \
|
||||||
--owner ${{ env.OWNER }}
|
--owner ${{ env.OWNER }} \
|
||||||
--image ${{ inputs.image }}
|
--image ${{ inputs.image }} \
|
||||||
--variant ${{ inputs.variant }}
|
--variant ${{ inputs.variant }} \
|
||||||
--platform ${{ inputs.platform }}
|
--platform ${{ inputs.platform }} \
|
||||||
--tags-dir /tmp/jupyter/tags/
|
--tags-dir /tmp/jupyter/tags/
|
||||||
# This step is needed to prevent pushing non-multi-arch "latest" tag
|
# This step is needed to prevent pushing non-multi-arch "latest" tag
|
||||||
- name: Remove the "latest" tag from the image 🗑️
|
- name: Remove the "latest" tag from the image 🗑️
|
||||||
run: docker image rmi ${{ env.REGISTRY }}/${{ env.OWNER }}/${{ inputs.image }}:latest
|
run: docker image rmi ${{ env.REGISTRY }}/${{ env.OWNER }}/${{ inputs.image }}:latest
|
||||||
|
12
.github/workflows/docker-wiki-update.yml
vendored
12
.github/workflows/docker-wiki-update.yml
vendored
@@ -40,12 +40,12 @@ jobs:
|
|||||||
path: wiki_src/
|
path: wiki_src/
|
||||||
|
|
||||||
- name: Update wiki 🏷
|
- name: Update wiki 🏷
|
||||||
run: >
|
run: |
|
||||||
python3 -m wiki.update_wiki
|
python3 -m wiki.update_wiki \
|
||||||
--wiki-dir wiki_src/
|
--wiki-dir wiki_src/ \
|
||||||
--hist-lines-dir /tmp/jupyter/hist_lines/
|
--hist-lines-dir /tmp/jupyter/hist_lines/ \
|
||||||
--manifests-dir /tmp/jupyter/manifests/
|
--manifests-dir /tmp/jupyter/manifests/ \
|
||||||
--repository ${{ github.repository }}
|
--repository ${{ github.repository }}
|
||||||
shell: bash
|
shell: bash
|
||||||
|
|
||||||
- name: Push Wiki to GitHub 📤
|
- name: Push Wiki to GitHub 📤
|
||||||
|
18
.github/workflows/registry-move.yml
vendored
18
.github/workflows/registry-move.yml
vendored
@@ -33,18 +33,18 @@ jobs:
|
|||||||
|
|
||||||
- name: Login to Quay.io 🔐
|
- name: Login to Quay.io 🔐
|
||||||
if: env.PUSH_TO_REGISTRY == 'true'
|
if: env.PUSH_TO_REGISTRY == 'true'
|
||||||
run: >
|
run: |
|
||||||
skopeo login quay.io
|
skopeo login quay.io \
|
||||||
--username ${{ secrets.QUAY_USERNAME }}
|
--username ${{ secrets.QUAY_USERNAME }} \
|
||||||
--password ${{ secrets.QUAY_ROBOT_TOKEN }}
|
--password ${{ secrets.QUAY_ROBOT_TOKEN }}
|
||||||
|
|
||||||
- name: Move image from Docker Hub to Quay.io 🐳
|
- name: Move image from Docker Hub to Quay.io 🐳
|
||||||
if: env.PUSH_TO_REGISTRY == 'true'
|
if: env.PUSH_TO_REGISTRY == 'true'
|
||||||
run: >
|
run: |
|
||||||
skopeo copy
|
skopeo copy \
|
||||||
--multi-arch all
|
--multi-arch all \
|
||||||
docker://${{ env.OWNER }}/${{ matrix.image }}:${{ matrix.tag }}
|
docker://${{ env.OWNER }}/${{ matrix.image }}:${{ matrix.tag }} \
|
||||||
docker://quay.io/${{ env.OWNER }}/${{ matrix.image }}:${{ matrix.tag }}
|
docker://quay.io/${{ env.OWNER }}/${{ matrix.image }}:${{ matrix.tag }}
|
||||||
|
|
||||||
strategy:
|
strategy:
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
|
Reference in New Issue
Block a user