Skip to content

Commit 0ce4f34

Browse files
Set namespaced registry properly
1 parent 7c59afe commit 0ce4f34

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

.github/workflows/docker_publish.yml

+6-6
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ on:
77

88
env:
99
REGISTRY: ghcr.io
10+
NAMESPACED_REGISTRY: ghcr.io/apollographql/ci-utility-docker-images
1011

1112
jobs:
1213
calculate-images-to-build:
@@ -31,7 +32,6 @@ jobs:
3132
echo "changed_dirs=$CHANGED_DIRS" >> "$GITHUB_OUTPUT"
3233
build-and-push-image:
3334
runs-on: ubuntu-latest
34-
# Sets the permissions granted to the `GITHUB_TOKEN` for the actions in this job.
3535
permissions:
3636
contents: read
3737
packages: write
@@ -58,8 +58,8 @@ jobs:
5858
echo "platforms=$(cat ${{ github.workspace }}/${{ matrix.changed_dir }}/config.yml | yq '.platforms | join(",")')" >> "$GITHUB_OUTPUT"
5959
- name: Check Image to Build Does Not Already Exist
6060
run: |
61-
if docker manifest inspect ${{ env.REGISTRY }}/${{ matrix.changed_dir }}:${{ steps.extract_from_config_yaml.outputs.desired_version }} > /dev/null; then
62-
echo "The tag "${{ env.REGISTRY }}/${{ matrix.changed_dir }}:${{ steps.extract_from_config_yaml.outputs.desired_version }}" already exists in the repository. Do you need to bump the version in the config.yml?"
61+
if docker manifest inspect ${{ env.NAMESPACED_REGISTRY }}/${{ matrix.changed_dir }}:${{ steps.extract_from_config_yaml.outputs.desired_version }} > /dev/null; then
62+
echo "The tag "${{ env.NAMESPACED_REGISTRY }}/${{ matrix.changed_dir }}:${{ steps.extract_from_config_yaml.outputs.desired_version }}" already exists in the repository. Do you need to bump the version in the config.yml?"
6363
exit 1
6464
fi
6565
- name: Calculate Version
@@ -73,7 +73,7 @@ jobs:
7373
id: meta
7474
uses: docker/metadata-action@v5
7575
with:
76-
images: ${{ env.REGISTRY }}/${{ matrix.changed_dir }}
76+
images: ${{ env.NAMESPACED_REGISTRY }}/${{ matrix.changed_dir }}
7777
tags: |
7878
type=semver,pattern={{version}},value=v${{ steps.calculate_version.outputs.version }}
7979
type=sha
@@ -90,7 +90,7 @@ jobs:
9090
- name: Generate artifact attestation
9191
uses: actions/attest-build-provenance@v1
9292
with:
93-
subject-name: ${{ env.REGISTRY }}/${{ matrix.changed_dir }}
93+
subject-name: ${{ env.NAMESPACED_REGISTRY }}/${{ matrix.changed_dir }}
9494
subject-digest: ${{ steps.push.outputs.digest }}
9595
push-to-registry: true
9696
- name: Create Git Tag
@@ -101,7 +101,7 @@ jobs:
101101
default_bump: false
102102
default_prerelease_bump: false
103103
custom_tag: ${{ matrix.changed_dir }}/v${{ steps.calculate_version.outputs.version }}
104-
- name: Create GitHub Releas
104+
- name: Create GitHub Release
105105
if: ${{ github.event_name != 'pull_request' }}
106106
uses: comnoco/create-release-action@v2.0.5
107107
with:

0 commit comments

Comments
 (0)