build: look for repository first
This commit is contained in:
@@ -32,6 +32,14 @@ jobs:
|
||||
username: ${{ secrets.REGISTRY_USERNAME }}
|
||||
password: ${{ secrets.REGISTRY_PASSWORD }}
|
||||
|
||||
- name: Ensure repository exists
|
||||
run: |
|
||||
curl -f -X POST \
|
||||
-H "Authorization: token ${{ secrets.REGISTRY_PASSWORD }}" \
|
||||
-H "Content-Type: application/json" \
|
||||
-d '{"name":"zebra-power","private":false,"description":"Zebra Power Docker Images"}' \
|
||||
${{ env.REGISTRY }}/api/v1/user/repos || echo "Repository may already exist"
|
||||
|
||||
- name: Extract metadata
|
||||
id: meta
|
||||
uses: docker/metadata-action@v5
|
||||
|
||||
Reference in New Issue
Block a user