Update worckflow
All checks were successful
Build and Push Docker Image (Simple) / build-and-push (push) Successful in 9s
All checks were successful
Build and Push Docker Image (Simple) / build-and-push (push) Successful in 9s
This commit is contained in:
@@ -39,6 +39,19 @@ jobs:
|
||||
run: |
|
||||
docker push ${{ env.REGISTRY }}/${{ steps.repo.outputs.repository_lower }}/${{ steps.repo.outputs.repository_name }}:latest
|
||||
|
||||
- name: Link Docker package to repository
|
||||
run: |
|
||||
# Wait a moment for the package to be registered
|
||||
sleep 5
|
||||
|
||||
# Link the package to the repository using Gitea API
|
||||
curl -X PUT \
|
||||
-H "Authorization: token ${{ secrets.TOKEN }}" \
|
||||
-H "Content-Type: application/json" \
|
||||
-d '{"repository_id": ${{ gitea.repository_id }}}' \
|
||||
"https://${{ env.REGISTRY }}/api/v1/packages/${{ gitea.repository_owner }}/container/${{ steps.repo.outputs.repository_name }}/link" || \
|
||||
echo "⚠️ Package linking failed, but package should still be available"
|
||||
|
||||
- name: Link package to repository
|
||||
run: |
|
||||
echo "✅ Docker image pushed to: ${{ env.REGISTRY }}/${{ steps.repo.outputs.repository_lower }}/${{ steps.repo.outputs.repository_name }}:latest"
|
||||
|
||||
Reference in New Issue
Block a user