Skip to content

Commit

Permalink
⚙️ config(ci): Always refer to commit-tagged image in ci:build:image.
Browse files Browse the repository at this point in the history
  • Loading branch information
make-github-pseudonymous-again committed Apr 20, 2024
1 parent 9bb8914 commit 94e543e
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion .github/workflows/ci:build:image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,15 @@ jobs:
scripts/ensure-replica-set.js
sparse-checkout-cone-mode: false

- name: Get server image URL
id: server-image-url
env:
IMAGE_METADATA: ${{ needs.build.outputs.server-image }}
run: |
IMAGE_URL="$(echo "${IMAGE_METADATA}" | jq -r 'first(.tags[] | select(test(":sha-[0-9a-f]{40}$")))')"
echo "url=${IMAGE_URL}" >> $GITHUB_OUTPUT
test -n "${IMAGE_URL}"
- name: Log in to GitHub Packages registry
uses: docker/login-action@v3
with:
Expand Down Expand Up @@ -139,7 +148,7 @@ jobs:
--env "MONGO_URL=${MONGO_URL}" \
--env "PORT=${PORT}" \
--name server \
${{ fromJSON(needs.build.outputs.server-image).tags[0] }}
${{ steps.server-image-url.outputs.url }}
- name: Retrieve server container IP address
id: server-container-ip-address
Expand Down

0 comments on commit 94e543e

Please sign in to comment.