Skip to content

Commit

Permalink
Set namespaced registry properly
Browse files Browse the repository at this point in the history
  • Loading branch information
jonathanrainer committed Aug 21, 2024
1 parent 7c59afe commit 2c6fbb6
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/docker_publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ on:

env:
REGISTRY: ghcr.io
NAMESPACED_REGISTRY: ghcr.io/apollographql/ci-utility-docker-images

jobs:
calculate-images-to-build:
Expand All @@ -31,7 +32,6 @@ jobs:
echo "changed_dirs=$CHANGED_DIRS" >> "$GITHUB_OUTPUT"
build-and-push-image:
runs-on: ubuntu-latest
# Sets the permissions granted to the `GITHUB_TOKEN` for the actions in this job.
permissions:
contents: read
packages: write
Expand All @@ -58,8 +58,8 @@ jobs:
echo "platforms=$(cat ${{ github.workspace }}/${{ matrix.changed_dir }}/config.yml | yq '.platforms | join(",")')" >> "$GITHUB_OUTPUT"
- name: Check Image to Build Does Not Already Exist
run: |
if docker manifest inspect ${{ env.REGISTRY }}/${{ matrix.changed_dir }}:${{ steps.extract_from_config_yaml.outputs.desired_version }} > /dev/null; then
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?"
if docker manifest inspect ${{ env.NAMESPACED_REGISTRY }}/${{ matrix.changed_dir }}:${{ steps.extract_from_config_yaml.outputs.desired_version }} > /dev/null; then
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?"
exit 1
fi
- name: Calculate Version
Expand All @@ -73,7 +73,7 @@ jobs:
id: meta
uses: docker/metadata-action@v5
with:
images: ${{ env.REGISTRY }}/${{ matrix.changed_dir }}
images: ${{ env.NAMESPACED_REGISTRY }}/${{ matrix.changed_dir }}
tags: |
type=semver,pattern={{version}},value=v${{ steps.calculate_version.outputs.version }}
type=sha
Expand Down

0 comments on commit 2c6fbb6

Please sign in to comment.