jfa-go/.drone.yml

100 lines
2.5 KiB
YAML
Raw Normal View History

---
name: jfa-go
kind: pipeline
type: docker
steps:
- name: fetch
image: docker:git
commands:
- git fetch --tags
- name: release
image: golang:latest
environment:
GITHUB_TOKEN:
from_secret: github_token
commands:
- apt update -y
- apt install build-essential python3-pip curl software-properties-common sed upx -y
- (curl -sL https://deb.nodesource.com/setup_14.x | bash -)
- apt install nodejs
- curl -sL https://git.io/goreleaser | bash
when:
event: tag
2020-09-30 00:28:14 +02:00
---
name: jfa-go-git
kind: pipeline
type: docker
steps:
- name: build
image: golang:latest
commands:
- apt update -y
- apt install build-essential python3-pip curl software-properties-common sed upx -y
- (curl -sL https://deb.nodesource.com/setup_14.x | bash -)
- apt install nodejs
- curl -sL https://git.io/goreleaser > goreleaser.sh
- chmod +x goreleaser.sh
- ./goreleaser.sh --snapshot --skip-publish --rm-dist
- wget https://builds.hrfee.pw/upload.py
- pip3 install requests
2020-10-08 22:37:44 +02:00
- bash -c 'python3 upload.py https://builds.hrfee.pw hrfee jfa-go ./dist/*.tar.gz'
2020-10-08 22:10:31 +02:00
environment:
BUILDRONE_KEY:
from_secret: BUILDRONE_KEY
2021-02-11 16:29:33 +01:00
- name: arm-ssh
image: appleboy/drone-ssh
2021-02-11 16:48:13 +01:00
volumes:
- name: ssh_key
path: /root/drone_rsa
2021-02-11 16:29:33 +01:00
settings:
host:
from_secret: ssh_host
username:
from_secret: ssh_username
port:
from_secret: ssh_port
2021-02-11 16:37:02 +01:00
volumes:
2021-02-11 16:48:13 +01:00
- /root/.ssh/docker-build:/root/drone_rsa
key_path: /root/drone_rsa
2021-02-11 16:29:33 +01:00
script:
- /home/rock64/jfa-go-build/build.sh
2020-09-30 00:28:14 +02:00
2021-02-11 16:48:13 +01:00
volumes:
- name: ssh_key
host:
path: /root/.ssh/docker-build
trigger:
branch:
- main
- go1.16
event:
exclude:
- pull_request
---
name: jfa-go-pr
kind: pipeline
type: docker
steps:
- name: build
image: golang:latest
commands:
- apt update -y
- apt install build-essential python3-pip curl software-properties-common sed upx -y
- (curl -sL https://deb.nodesource.com/setup_14.x | bash -)
- apt install nodejs
- curl -sL https://git.io/goreleaser > goreleaser.sh
- chmod +x goreleaser.sh
- ./goreleaser.sh --snapshot --skip-publish --rm-dist
trigger:
event:
include:
- pull_request
2021-02-11 16:29:33 +01:00