Skip to content

Commit

Permalink
lowercase repo name
Browse files Browse the repository at this point in the history
  • Loading branch information
PINTO0309 committed May 22, 2024
1 parent 1a4373d commit 5205c9b
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 13 deletions.
30 changes: 20 additions & 10 deletions .github/workflows/python-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,11 @@ jobs:
platform=${{ matrix.platform }}
echo "PLATFORM_PAIR=${platform//\//-}" >> $GITHUB_ENV
- name: Repository to lowercase
id: lower-repo-1
run: |
echo "repository=${GITHUB_REPOSITORY@L}" >> $GITHUB_OUTPUT
# For Github Container Registory
- name: Log in to GCR
uses: docker/login-action@v3
Expand All @@ -66,7 +71,7 @@ jobs:
id: meta_gh
uses: docker/metadata-action@v5
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
images: ${{ env.REGISTRY }}/${{ steps.lower-repo-1.outputs.repository }}
- name: Build and push by digest to GCR
id: build_gh
uses: docker/build-push-action@v5
Expand All @@ -75,7 +80,7 @@ jobs:
platforms: ${{ matrix.platform }}
push: true
labels: ${{ steps.meta_gh.outputs.labels }}
outputs: type=image,name=${{ env.REGISTRY }}/${{ env.IMAGE_NAME }},push-by-digest=true,name-canonical=true,push=true
outputs: type=image,name=${{ env.REGISTRY }}/${{ steps.lower-repo-1.outputs.repository }},push-by-digest=true,name-canonical=true,push=true
cache-from: type=gha
cache-to: type=gha,mode=max

Expand All @@ -90,7 +95,7 @@ jobs:
id: meta_dh
uses: docker/metadata-action@v5
with:
images: ${{ env.DOCKER_REGISTRY }}/${{ env.IMAGE_NAME }}
images: ${{ env.DOCKER_REGISTRY }}/${{ steps.lower-repo-1.outputs.repository }}
- name: Build and push by digest to Docker Hub
id: build_dh
uses: docker/build-push-action@v5
Expand All @@ -99,7 +104,7 @@ jobs:
platforms: ${{ matrix.platform }}
push: true
labels: ${{ steps.meta_gh.outputs.labels }}
outputs: type=image,name=${{ env.DOCKER_REGISTRY }}/${{ env.IMAGE_NAME }},push-by-digest=true,name-canonical=true,push=true
outputs: type=image,name=${{ env.DOCKER_REGISTRY }}/${{ steps.lower-repo-1.outputs.repository }},push-by-digest=true,name-canonical=true,push=true
cache-from: type=gha
cache-to: type=gha,mode=max

Expand Down Expand Up @@ -135,6 +140,11 @@ jobs:
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3

- name: Repository to lowercase
id: lower-repo-2
run: |
echo "repository=${GITHUB_REPOSITORY@L}" >> $GITHUB_OUTPUT
# For Github Container Registory
- name: Log in to GCR
uses: docker/login-action@v3
Expand All @@ -146,15 +156,15 @@ jobs:
id: meta_gh
uses: docker/metadata-action@v5
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
images: ${{ env.REGISTRY }}/${{ steps.lower-repo-2.outputs.repository }}
- name: Create manifest list and push to GCR
working-directory: /tmp/digests/gh
run: |
docker buildx imagetools create $(jq -cr '.tags | map("-t " + .) | join(" ")' <<< "$DOCKER_METADATA_OUTPUT_JSON") \
$(printf '${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}@sha256:%s ' *)
$(printf '${{ env.REGISTRY }}/${{ steps.lower-repo-2.outputs.repository }}@sha256:%s ' *)
- name: Inspect image on GCR
run: |
docker buildx imagetools inspect ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ steps.meta_gh.outputs.version }}
docker buildx imagetools inspect ${{ env.REGISTRY }}/${{ steps.lower-repo-2.outputs.repository }}:${{ steps.meta_gh.outputs.version }}
# For Docker Hub
- name: Log in to the Docker Hub
Expand All @@ -167,12 +177,12 @@ jobs:
id: meta_dh
uses: docker/metadata-action@v5
with:
images: ${{ env.DOCKER_REGISTRY }}/${{ env.IMAGE_NAME }}
images: ${{ env.DOCKER_REGISTRY }}/${{ steps.lower-repo-2.outputs.repository }}
- name: Create manifest list and push to Docker Hub
working-directory: /tmp/digests/dh
run: |
docker buildx imagetools create $(jq -cr '.tags | map("-t " + .) | join(" ")' <<< "$DOCKER_METADATA_OUTPUT_JSON") \
$(printf '${{ env.DOCKER_REGISTRY }}/${{ env.IMAGE_NAME }}@sha256:%s ' *)
$(printf '${{ env.DOCKER_REGISTRY }}/${{ steps.lower-repo-2.outputs.repository }}@sha256:%s ' *)
- name: Inspect image on Docker Hub
run: |
docker buildx imagetools inspect ${{ env.DOCKER_REGISTRY }}/${{ env.IMAGE_NAME }}:${{ steps.meta_dh.outputs.version }}
docker buildx imagetools inspect ${{ env.DOCKER_REGISTRY }}/${{ steps.lower-repo-2.outputs.repository }}:${{ steps.meta_dh.outputs.version }}
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -271,15 +271,15 @@ Video speed is adjusted approximately 50 times slower than actual speed.
docker run --rm -it \
-v `pwd`:/workdir \
-w /workdir \
ghcr.io/pinto0309/onnx2tf:1.22.1
ghcr.io/pinto0309/onnx2tf:1.22.3

or

# Authentication is not required for pulls from Docker Hub.
docker run --rm -it \
-v `pwd`:/workdir \
-w /workdir \
docker.io/pinto0309/onnx2tf:1.22.1
docker.io/pinto0309/onnx2tf:1.22.3

or

Expand Down
2 changes: 1 addition & 1 deletion onnx2tf/__init__.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
from onnx2tf.onnx2tf import convert, main

__version__ = '1.22.1'
__version__ = '1.22.3'

0 comments on commit 5205c9b

Please sign in to comment.