File tree Expand file tree Collapse file tree 1 file changed +11
-3
lines changed Expand file tree Collapse file tree 1 file changed +11
-3
lines changed Original file line number Diff line number Diff line change 1515 # Use docker.io for Docker Hub if empty
1616 REGISTRY : ghcr.io
1717 # github.repository as <account>/<repo>
18- IMAGE_NAME : ${{ github.repository }}
18+ REGISTRY_PATH : ${{ github.repository }}
1919 TEST_TAG : user/app:test
2020
2121jobs :
3030 - name : Setup Docker buildx
3131 uses : docker/setup-buildx-action@v3.9.0
3232
33- # Build but not push Docker image with Buildx
33+ # Build but don't push Docker image with Buildx
3434 # https://github.com/docker/build-push-action
3535 - name : Build test image
3636 id : build-test
6565 - socketio_app
6666 - dramatiq_app
6767 steps :
68+ # GitHub gives only repository complete in <owner>/<repo> format.
69+ # Need some manual sheanigans
70+ # Set IMAGE_NAME so we can push to <owner>/<repo>/<image>
71+ - name : Set ENV variables
72+ run : |
73+ echo "IMAGE_NAME=${GITHUB_REPOSITORY#$GITHUB_REPOSITORY_OWNER/}" >> $GITHUB_ENV
74+
6875 - name : Checkout repository
6976 uses : actions/checkout@v4
7077
95102 uses : docker/metadata-action@v5.6.1
96103 with :
97104 # list of Docker images to use as base name for tags
105+ # <registry/<owner>/<repo_name>/<repo_name>-<target>
98106 images : |
99- ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}/${{ env.IMAGE_NAME }}-${{ matrix.docker_target }}
107+ ${{ env.REGISTRY }}/${{ env.REGISTRY_PATH }}/${{ env.IMAGE_NAME }}-${{ matrix.docker_target }}
100108 # generate Docker tags based on the following events/attributes
101109 tags : |
102110 type=sha
You can’t perform that action at this time.
0 commit comments