upload bin instead of elf
This commit is contained in:
parent
4b16f12f74
commit
f119f58f40
1 changed files with 34 additions and 1 deletions
35
.drone.yml
35
.drone.yml
|
|
@ -27,4 +27,37 @@ steps:
|
|||
commands:
|
||||
- source .env
|
||||
- apk add --no-cache curl
|
||||
- curl --user "jonasled:$DOCKER_PASSWORD" --upload-file ".pio/build/d1_mini_lite/firmware.elf" "https://$gitea_domain/api/packages/$gitea_user/generic/$gitea_repo/$DRONE_BRANCH/firmware.elf"
|
||||
- package_link="https://$gitea_domain/api/packages/$gitea_user/generic/$gitea_repo/$DRONE_BRANCH/firmware.bin"
|
||||
- |
|
||||
if ! curl -s --head --user "$gitea_user:$DOCKER_PASSWORD" --request GET "$package_link" | grep "404 Not Found" > /dev/null
|
||||
then
|
||||
echo "File already exists, deleting it"
|
||||
curl --user "$gitea_user:$DOCKER_PASSWORD" -X DELETE "$package_link"
|
||||
fi
|
||||
- curl --user "$gitea_user:$DOCKER_PASSWORD" --upload-file ".pio/build/d1_mini_lite/firmware.bin" $package_link
|
||||
when:
|
||||
event:
|
||||
- push
|
||||
|
||||
- name: upload-to-transfersh
|
||||
image: archlinux
|
||||
commands:
|
||||
- pacman -Syu --noconfirm curl
|
||||
- download_url=$(curl --upload-file "f.pio/build/d1_mini_lite/firmware.bin" "https://transfer.jonasled.de")
|
||||
- echo "download_url=$download_url" >> .env
|
||||
- 'echo "Download URL: $download_url" > comment.txt'
|
||||
when:
|
||||
event:
|
||||
- pull_request
|
||||
|
||||
- name: add comment to gitea pull request
|
||||
image: tsakidev/giteacomment:latest
|
||||
settings:
|
||||
gitea_token:
|
||||
from_secret: gitea_token
|
||||
gitea_base_url: https://jonasled.dev
|
||||
comment_title: 'Build finished'
|
||||
comment_from_file: comment.txt
|
||||
when:
|
||||
event:
|
||||
- pull_request
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue