live-cli/.drone.yml

65 lines
1.5 KiB
YAML
Raw Normal View History

2022-12-23 00:08:55 -05:00
---
kind: pipeline
name: live-cli
type: docker
steps:
- name: Run earthly
image: earthly/earthly
privileged: true
volumes:
- name: docker_sock
path: /var/run/docker.sock
- name: dist
path: /dist
commands:
- 'file /var/run/docker.sock || :'
- 'pwd'
2022-12-25 17:22:24 -05:00
- 'earthly +all'
2022-12-23 00:08:55 -05:00
- 'cp -v ./dist/* /dist/'
2022-12-28 11:36:46 -05:00
# - name: Minio Artifacts
# image: plugins/s3
# settings:
# bucket: artifacts
# access_key:
# from_secret: MINIO_ARTIFACTS_ACCESS_KEY
# secret_key:
# from_secret: MINIO_ARTIFACTS_SECRET_KEY
# source: dist/**/*
# target: live-cli/${DRONE_BUILD_CREATED}-${DRONE_COMMIT}
2022-12-28 11:05:33 -05:00
2022-12-29 15:09:58 -05:00
- name: Publish Artifacts
image: ubuntu
volumes:
- name: dist
path: /dist
environment:
GITEA_SVC_USERNAME:
from_secrete: GITEA_SVC_USERNAME
GITEA_SVC_PASSWORD:
from_secret: GITEA_SVC_PASSWORD
commands:
- set -ex; cd /dist; for f in *; do curl --user "drone-svc:${GITEA_SVC_PASSWORD}" -X PUT https://gitea.example.com/api/packages/public/generic/${DRONE_REPO_NAME}/$(date -Isecond)-${DRONE_COMMIT}/${f}; done
- name: Publish release
2022-12-23 00:08:55 -05:00
image: plugins/gitea-release
2022-12-27 19:58:55 -05:00
when:
event:
- tag
2022-12-23 00:08:55 -05:00
settings:
2022-12-27 19:58:55 -05:00
api_key:
from_secret: GITEA_API_KEY
2022-12-23 00:08:55 -05:00
base_url: https://gitea.austen-wares.com
files: dist/*
volumes:
- name: dist
path: /dist
volumes:
- name: docker_sock
host:
path: /var/run/docker.sock
- name: dist
temp: {}