forked from Conjure-Tools/unity-runner
Enhance Docker registry connectivity checks and secret validation
Some checks failed
🤓 Individual Runners / Build 🐳 windows-mono (push) Failing after 1m35s
Some checks failed
🤓 Individual Runners / Build 🐳 windows-mono (push) Failing after 1m35s
This commit is contained in:
parent
67d15c3873
commit
514028241e
@ -54,12 +54,24 @@ jobs:
|
|||||||
- name: Test connectivity
|
- name: Test connectivity
|
||||||
run: |
|
run: |
|
||||||
echo "Testing connection to registry..."
|
echo "Testing connection to registry..."
|
||||||
time curl -v https://${{ env.DOCKER_REGISTRY_DOMAIN }}/v2/ || true
|
time curl -v --max-time 30 https://${{ env.DOCKER_REGISTRY_DOMAIN }}/v2/ || true
|
||||||
|
|
||||||
|
- name: Check secrets
|
||||||
|
env:
|
||||||
|
REGISTRY_TOKEN: ${{ secrets.REGISTRY_TOKEN }}
|
||||||
|
PIPELINES_USERNAME: ${{ secrets.PIPELINES_USERNAME }}
|
||||||
|
run: |
|
||||||
|
echo "Username length: ${#PIPELINES_USERNAME}"
|
||||||
|
echo "Token length: ${#REGISTRY_TOKEN}"
|
||||||
|
if [ -z "$PIPELINES_USERNAME" ]; then echo "ERROR: PIPELINES_USERNAME is empty!"; fi
|
||||||
|
if [ -z "$REGISTRY_TOKEN" ]; then echo "ERROR: REGISTRY_TOKEN is empty!"; fi
|
||||||
|
|
||||||
- name: Login to the Container registry
|
- name: Login to the Container registry
|
||||||
env:
|
env:
|
||||||
REGISTRY_TOKEN: ${{ secrets.REGISTRY_TOKEN }}
|
REGISTRY_TOKEN: ${{ secrets.REGISTRY_TOKEN }}
|
||||||
PIPELINES_USERNAME: ${{ secrets.PIPELINES_USERNAME }}
|
PIPELINES_USERNAME: ${{ secrets.PIPELINES_USERNAME }}
|
||||||
|
DOCKER_CLIENT_TIMEOUT: 300
|
||||||
|
COMPOSE_HTTP_TIMEOUT: 300
|
||||||
run: |
|
run: |
|
||||||
echo "${REGISTRY_TOKEN}" | docker login "${{ env.DOCKER_REGISTRY_DOMAIN }}" -u "${PIPELINES_USERNAME}" --password-stdin
|
echo "${REGISTRY_TOKEN}" | docker login "${{ env.DOCKER_REGISTRY_DOMAIN }}" -u "${PIPELINES_USERNAME}" --password-stdin
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user