Compare commits

..

No commits in common. "ae094a566cc3af2a74a06856844743ef93d065ec" and "9f13b9fdf6c451a892aeeafcebf23ad38c74cf5f" have entirely different histories.

View File

@ -8,7 +8,7 @@ env:
BINARY_PATH: bin
BINARY_NAME: eia-client
GO_MOD_PATH: gitea.libretechconsulting.com/50w/eia-api-go
GO_GIT_HOST: gitea.libretechconsulting.com
GOPRIVATE: gitea.libretechconsulting.com/*
# DOCKER_HOST: "unix:///var/run/user/1000/docker.sock"
# DOCKER_ORG: "rmcguire"
# DOCKER_LATEST: "latest"
@ -43,23 +43,15 @@ jobs:
fi
- 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: |
# Set up netrc for Gitea
echo "machine ${GO_GIT_HOST} login ${GITHUB_REPOSITORY_OWNER} password ${API_TOKEN}" > ~/.netrc
chmod 0600 ~/.netrc
# Package and get mod info
go mod download -x --json ${GO_MOD_PATH}@${{ github.ref_name }} | tee package.json
echo "Generating package archive for ${GO_MOD_PATH}@${{ github.ref_name }}"
go mod tidy -v
go mod download --json ${GO_MOD_PATH}@${{ github.ref_name }} > package.json
if [[ $? -ne 0 ]]; then
echo "Failed to generage go package archive for ${GO_MOD_PATH}@${{ github.ref_name }}"
exit 1
fi
ZIPFILE=$( jq .Zip < package.json | tr -d '"' )
# Upload to Gitea go registry
ZIPFILE=$( jq .Zip < package.json )
echo "Uploading go package ${ZIPFILE}"
curl -X PUT \
-H "Authorization: token ${API_TOKEN}" \