[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:
Ayaz Salikhov
2023-11-17 23:01:33 +01:00
committed by GitHub
parent 0c800adc51
commit cd2875a0da
2 changed files with 3 additions and 4 deletions

View File

@@ -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'

View File

@@ -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)