Add docker env
This commit is contained in:
@@ -24,11 +24,15 @@ jobs:
|
||||
steps:
|
||||
- name: Verify image exists in registry
|
||||
# Fail fast if the user typed a version that was never built. Catches
|
||||
# typos before we touch the gitops repo.
|
||||
# typos before we touch the gitops repo. Uses env-var pattern for
|
||||
# credentials to avoid shell interpolation mangling special characters.
|
||||
env:
|
||||
REG_USER: ${{ secrets.REGISTRY_USERNAME }}
|
||||
REG_PASS: ${{ secrets.REGISTRY_PASSWORD }}
|
||||
run: |
|
||||
set -euo pipefail
|
||||
status=$(curl -sf -o /dev/null -w '%{http_code}' \
|
||||
-u "${{ secrets.REGISTRY_USERNAME }}:${{ secrets.REGISTRY_PASSWORD }}" \
|
||||
-u "$REG_USER:$REG_PASS" \
|
||||
"https://${REGISTRY}/v2/${IMAGE}/manifests/${{ inputs.version }}" \
|
||||
|| true)
|
||||
if [ "$status" != "200" ]; then
|
||||
|
||||
Reference in New Issue
Block a user