Some checks reported errors
continuous-integration/drone/push Build encountered an error
47 lines
1.7 KiB
YAML
47 lines
1.7 KiB
YAML
kind: pipeline
|
|
type: docker
|
|
name: build
|
|
|
|
steps:
|
|
- name: build-image
|
|
image: plugins/docker
|
|
settings:
|
|
repo: t3hn3rd/asuro-build
|
|
tags: latest
|
|
dockerfile: Dockerfile
|
|
registry: docker.io
|
|
username:
|
|
from_secret: docker_username
|
|
password:
|
|
from_secret: docker_password
|
|
|
|
- name: compile
|
|
image: t3hn3rd/asuro-build:latest
|
|
depends_on:
|
|
- build-image
|
|
commands:
|
|
- git fetch --tags
|
|
- find . -type f -print0 | xargs -0 dos2unix
|
|
- chmod +x /drone/src/*.sh
|
|
- /drone/src/compile.sh
|
|
|
|
- name: upload-iso-artifact
|
|
image: alpine/git
|
|
depends_on:
|
|
- compile
|
|
# when:
|
|
# branch:
|
|
# - master
|
|
environment:
|
|
GITEA_TOKEN:
|
|
from_secret: gitea_token
|
|
commands:
|
|
- apk add --no-cache curl
|
|
- chmod +w Asuro.iso
|
|
- git rev-parse --short HEAD > commit_hash.txt
|
|
- COMMIT_HASH=$(cat commit_hash.txt) && cp Asuro.iso "Asuro-${COMMIT_HASH}.iso"
|
|
- COMMIT_HASH=$(cat commit_hash.txt) && echo "Uploading Asuro-${COMMIT_HASH}.iso to Gitea Packages..."
|
|
- COMMIT_HASH=$(cat commit_hash.txt) && curl -X PUT "https://gitea.spexeah.com/api/packages/Spexeah/generic/asuro-iso/${COMMIT_HASH}/Asuro.iso" -H "Authorization: token $GITEA_TOKEN" --upload-file "Asuro-${COMMIT_HASH}.iso"
|
|
- echo "Updating latest ISO reference..."
|
|
- curl -X DELETE https://gitea.spexeah.com/api/packages/Spexeah/generic/asuro-iso/latest/Asuro.iso -H "Authorization: token $GITEA_TOKEN" || echo "No previous latest version found."
|
|
- COMMIT_HASH=$(cat commit_hash.txt) && curl -X PUT https://gitea.spexeah.com/api/packages/Spexeah/generic/asuro-iso/latest/Asuro.iso -H "Authorization: token $GITEA_TOKEN" --upload-file "Asuro-${COMMIT_HASH}.iso" |