From bccd91ca30c06047e0898d70df98036ad89b047b Mon Sep 17 00:00:00 2001 From: Ryan D McGuire Date: Mon, 16 Dec 2024 16:46:19 -0500 Subject: [PATCH] Add go package upload --- .gitea/workflows/ci.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.gitea/workflows/ci.yml b/.gitea/workflows/ci.yml index 4235291..d20c75e 100644 --- a/.gitea/workflows/ci.yml +++ b/.gitea/workflows/ci.yml @@ -8,7 +8,7 @@ env: BINARY_PATH: bin BINARY_NAME: eia-client GO_MOD_PATH: gitea.libretechconsulting.com/50W/eia-api-go - GITEA_HOST: gitea.libretechconsulting.com + GO_GIT_HOST: gitea.libretechconsulting.com # DOCKER_HOST: "unix:///var/run/user/1000/docker.sock" # DOCKER_ORG: "rmcguire" # DOCKER_LATEST: "latest" @@ -45,9 +45,10 @@ jobs: - name: Generate and Upload Package to Go Registry env: GOPRIVATE: gitea.libretechconsulting.com/* + API_TOKEN: ${{ secrets.API_TOKEN }} # Replace with a Gitea token stored in repository secrets run: | go list --json - echo "machine ${GITEA_HOST} login ${GITHUB_REPOSITORY_OWNER} password ${API_TOKEN}" > ~/.netrc + echo "machine ${GO_GIT_HOST} login ${GITHUB_REPOSITORY_OWNER} password ${API_TOKEN}" > ~/.netrc chmod 0600 ~/.netrc go mod download -x --json ${GO_MOD_PATH}@${{ github.ref_name }} 2>&1 if [[ $? -ne 0 ]]; then