--- 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' - 'earthly +all' - 'cp -v ./dist/* /dist/' # - 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} - name: Publish Artifacts image: curlimages/curl volumes: - name: dist path: /dist environment: GITEA_SVC_USERNAME: from_secrete: GITEA_SVC_USERNAME GITEA_SVC_PASSWORD: from_secret: GITEA_SVC_PASSWORD commands: - sh -c 'set -ex; cd /dist; for f in *; do curl --user "drone-svc:$${GITEA_SVC_PASSWORD}" -X PUT https://gitea.austen-wares.com.com/api/packages/public/generic/$${DRONE_REPO_NAME}/$$(date -Isecond)-$${DRONE_COMMIT}/$${f}; done' - name: Publish release image: plugins/gitea-release when: event: - tag settings: api_key: from_secret: GITEA_API_KEY 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: {}