Fix artifact upload
This commit is contained in:
parent
555af4beae
commit
3b707cced3
@ -28,13 +28,13 @@ 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}
|
|
||||||
API_TOKEN: ${{ secrets.API_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 ./${BINARY_PATH}/${BINARY_NAME} ]; then
|
if [ -f ./${BINARY_PATH}/${BINARY_NAME} ]; then
|
||||||
curl -X PUT --user ${GITHUB_REPOSITORY_OWNER}:${API_TOKEN} \
|
curl -X PUT \
|
||||||
-F "artifact=@./${BINARY_PATH}/${BINARY_NAME}" \
|
-H "Authorization: token ${API_TOKEN}" \
|
||||||
"$GITEA_ARTIFACT_SERVER/${{ github.ref_name }}/${BINARY_NAME}"
|
--upload-file ./${BINARY_PATH}/${BINARY_NAME} \
|
||||||
|
"${GITHUB_SERVER_URL}/api/packages/${GITHUB_REPOSITORY_OWNER}/generic/${PACKAGE_NAME}/${{ github.ref_name }}/${BINARY_NAME}"
|
||||||
else
|
else
|
||||||
echo "Error: Binary ./${BINARY_PATH}/${BINARY_NAME} not found."
|
echo "Error: Binary ./${BINARY_PATH}/${BINARY_NAME} not found."
|
||||||
exit 1
|
exit 1
|
||||||
|
Loading…
Reference in New Issue
Block a user