Moving around files and adding readme
Build and Push Docker Image / docker (push) Failing after 7s

This commit is contained in:
2026-09-17 14:15:38 -06:00
parent bc6ad686e1
commit 09d1f0b88c
4 changed files with 62 additions and 2 deletions
-25
View File
@@ -1,25 +0,0 @@
#!/bin/bash
DOCKERHUB_USERNAME="${1}"
DOCKERHUB_PASSWORD="${2}"
GITEA_OWNER_REPO="${3}"
GITEA_API_KEY="${4}"
gitea_username=$(echo "${GITEA_OWNER_REPO}" | sed 's/\/.*//')
repo_name=$(echo "${GITEA_OWNER_REPO}" | sed 's/^.*\///')
NEW_DOCKERHUB_TOKEN=$(curl -s -X POST "https://hub.docker.com/v2/auth/token" \
-H "Content-Type: application/json" \
-d "{\"identifier\": \"${DOCKERHUB_USERNAME}\", \"secret\": \"${DOCKERHUB_PASSWORD}\"}" \
| jq -r .access_token)
curl -X 'PUT' \
"https://gitea.happylizard.me/api/v1/repos/${gitea_username}/${repo_name}/actions/secrets/DOCKERHUB_TOKEN" \
-H 'accept: application/json' \
-H "Authorization: token ${GITEA_API_KEY}" \
-H 'Content-Type: application/json' \
-d "{
\"data\": \"${NEW_DOCKERHUB_TOKEN}\",
\"description\": \"\"
}"