Update .gitea/workflows/build-and-push.yaml
Some checks failed
Build and Push Container Image / build-and-push (push) Failing after 2s
Some checks failed
Build and Push Container Image / build-and-push (push) Failing after 2s
This commit is contained in:
@@ -47,9 +47,26 @@ jobs:
|
|||||||
|
|
||||||
- name: Login to Gitea registry
|
- name: Login to Gitea registry
|
||||||
run: |
|
run: |
|
||||||
echo "${{ secrets.REGISTRY_TOKEN }}" | docker login \
|
REGISTRY_USERNAME="${{ secrets.REGISTRY_USERNAME }}"
|
||||||
|
REGISTRY_TOKEN="${{ secrets.REGISTRY_TOKEN }}"
|
||||||
|
|
||||||
|
if [ -z "${REGISTRY_USERNAME}" ]; then
|
||||||
|
REGISTRY_USERNAME="${{ gitea.actor }}"
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ -z "${REGISTRY_USERNAME}" ]; then
|
||||||
|
echo "Registry username is missing. Set REGISTRY_USERNAME or run the workflow with a valid Gitea actor."
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ -z "${REGISTRY_TOKEN}" ]; then
|
||||||
|
echo "Registry token is missing. Set REGISTRY_TOKEN as a repository or organization secret."
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
echo "${REGISTRY_TOKEN}" | docker login \
|
||||||
"${{ steps.meta.outputs.registry_host }}" \
|
"${{ steps.meta.outputs.registry_host }}" \
|
||||||
--username "${{ secrets.REGISTRY_USERNAME }}" \
|
--username "${REGISTRY_USERNAME}" \
|
||||||
--password-stdin
|
--password-stdin
|
||||||
|
|
||||||
- name: Build image
|
- name: Build image
|
||||||
|
|||||||
Reference in New Issue
Block a user