mirror of
https://github.com/jupyter/docker-stacks.git
synced 2025-10-18 15:32:56 +00:00
[FAST_BUILD] Remove latest tag in workflow to make local development easier (#2034)
* Remove latest tag in workflow to make local development easier * Fix style * Update docker-tag-push.yml * Update docker-tag-push.yml
This commit is contained in:
3
.github/workflows/docker-tag-push.yml
vendored
3
.github/workflows/docker-tag-push.yml
vendored
@@ -52,6 +52,9 @@ jobs:
|
|||||||
path: /tmp/jupyter/tags/
|
path: /tmp/jupyter/tags/
|
||||||
- name: Apply tags to the loaded image 🏷
|
- name: Apply tags to the loaded image 🏷
|
||||||
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 }}
|
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 }}
|
||||||
|
# This step is needed to prevent pushing non-multiarch "latest" tag
|
||||||
|
- name: Remove "latest" tag from the image 🗑️
|
||||||
|
run: docker image rmi ${{ env.REGISTRY }}/${{ env.OWNER }}/${{ inputs.image }}:latest
|
||||||
|
|
||||||
- name: Push Images to Registry 📤
|
- name: Push Images to Registry 📤
|
||||||
if: env.PUSH_TO_REGISTRY == 'true'
|
if: env.PUSH_TO_REGISTRY == 'true'
|
||||||
|
@@ -23,7 +23,6 @@ def apply_tags(
|
|||||||
) -> None:
|
) -> None:
|
||||||
"""
|
"""
|
||||||
Tags <registry>/<owner>/<short_image_name>:latest with the tags reported by all taggers for this image
|
Tags <registry>/<owner>/<short_image_name>:latest with the tags reported by all taggers for this image
|
||||||
Then removes latest tag
|
|
||||||
"""
|
"""
|
||||||
LOGGER.info(f"Tagging image: {short_image_name}")
|
LOGGER.info(f"Tagging image: {short_image_name}")
|
||||||
|
|
||||||
@@ -35,9 +34,6 @@ def apply_tags(
|
|||||||
LOGGER.info(f"Applying tag: {tag}")
|
LOGGER.info(f"Applying tag: {tag}")
|
||||||
docker["tag", image, tag] & plumbum.FG
|
docker["tag", image, tag] & plumbum.FG
|
||||||
|
|
||||||
LOGGER.info("Removing latest tag from the image")
|
|
||||||
docker["image", "rmi", image] & plumbum.FG
|
|
||||||
|
|
||||||
|
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
logging.basicConfig(level=logging.INFO)
|
logging.basicConfig(level=logging.INFO)
|
||||||
|
Reference in New Issue
Block a user