Fix artifact config

This commit is contained in:
Ryan McGuire 2024-12-16 14:32:53 -05:00
parent 42e36af55b
commit 8f8ff64ac2

View File

@ -5,6 +5,7 @@ on:
env: env:
PACKAGE_NAME: eia-api-go PACKAGE_NAME: eia-api-go
BINARY_PATH: bin
BINARY_NAME: eia-client BINARY_NAME: eia-client
# DOCKER_HOST: "unix:///var/run/user/1000/docker.sock" # DOCKER_HOST: "unix:///var/run/user/1000/docker.sock"
# DOCKER_ORG: "rmcguire" # DOCKER_ORG: "rmcguire"
@ -28,12 +29,12 @@ jobs:
- name: Upload Artifact to Gitea - name: Upload Artifact to Gitea
env: env:
GITEA_ARTIFACT_SERVER: ${GITHUB_SERVER_URL}/api/packages/${GITHUB_REPOSITORY_OWNER}/generic/${PACKAGE_NAME} GITEA_ARTIFACT_SERVER: ${GITHUB_SERVER_URL}/api/packages/${GITHUB_REPOSITORY_OWNER}/generic/${PACKAGE_NAME}
GITEA_TOKEN: ${{ secrets.GITEA_TOKEN }} # Replace with a Gitea token stored in repository secrets API_TOKEN: ${{ secrets.API_TOKEN }} # Replace with a Gitea token stored in repository secrets
run: | run: |
if [ -f ./eia-client ]; then if [ -f ./eia-client ]; then
curl -X PUT --user ${GITHUB_REPOSITORY_OWNER}:${GITEA_TOKEN} \ curl -X PUT --user ${GITHUB_REPOSITORY_OWNER}:${API_TOKEN} \
-F "artifact=@./eia-client" \ -F "artifact=@./${BINARY_PATH}/${BINARY_NAME}" \
"$GITEA_ARTIFACT_SERVER/${{ github.ref_name }}/eia-client" "$GITEA_ARTIFACT_SERVER/${{ github.ref_name }}/${BINARY_NAME}"
else else
echo "Error: Binary eia-client not found." echo "Error: Binary eia-client not found."
exit 1 exit 1