Update .gitea/workflows/build-and-push.yaml
Some checks failed
Build and Push Container Image / build-and-push (push) Failing after 5s
Some checks failed
Build and Push Container Image / build-and-push (push) Failing after 5s
This commit is contained in:
@@ -31,16 +31,20 @@ jobs:
|
|||||||
fi
|
fi
|
||||||
echo "tag=${TAG}" >> "$GITHUB_OUTPUT"
|
echo "tag=${TAG}" >> "$GITHUB_OUTPUT"
|
||||||
|
|
||||||
- name: Configure Docker for insecure registry
|
- name: Setup registry auth
|
||||||
run: |
|
run: |
|
||||||
REGISTRY_HOST=$(echo "${{ gitea.server_url }}" | sed 's|https\?://||')
|
REGISTRY_HOST=$(echo "${{ gitea.server_url }}" | sed 's|https\?://||')
|
||||||
mkdir -p /etc/docker
|
AUTH=$(echo -n "${{ gitea.actor }}:${{ secrets.REGISTRY_TOKEN }}" | base64)
|
||||||
echo "{\"insecure-registries\": [\"${REGISTRY_HOST}\"]}" > /etc/docker/daemon.json
|
mkdir -p ~/.docker
|
||||||
|
cat > ~/.docker/config.json <<EOF
|
||||||
- name: Login to Gitea registry
|
{
|
||||||
run: |
|
"auths": {
|
||||||
REGISTRY_HOST=$(echo "${{ gitea.server_url }}" | sed 's|https\?://||')
|
"${REGISTRY_HOST}": {
|
||||||
echo "${{ secrets.REGISTRY_TOKEN }}" | docker login "http://${REGISTRY_HOST}" -u ${{ gitea.actor }} --password-stdin
|
"auth": "${AUTH}"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
EOF
|
||||||
|
|
||||||
- name: Build and push image
|
- name: Build and push image
|
||||||
run: |
|
run: |
|
||||||
|
|||||||
Reference in New Issue
Block a user