mirror of
https://github.com/thegeeklab/wp-s3-action.git
synced 2024-11-14 10:10:39 +00:00
71 lines
1.3 KiB
YAML
71 lines
1.3 KiB
YAML
|
---
|
||
|
kind: pipeline
|
||
|
name: linux-amd64
|
||
|
|
||
|
platform:
|
||
|
os: linux
|
||
|
arch: amd64
|
||
|
|
||
|
steps:
|
||
|
- name: build
|
||
|
pull: always
|
||
|
image: golang:1.11
|
||
|
commands:
|
||
|
- "go build -v -ldflags \"-X main.build=${DRONE_BUILD_NUMBER}\" -a -o release/linux/amd64/drone-s3-sync"
|
||
|
environment:
|
||
|
CGO_ENABLED: 0
|
||
|
GO111MODULE: on
|
||
|
when:
|
||
|
event:
|
||
|
- push
|
||
|
- pull_request
|
||
|
|
||
|
- name: build
|
||
|
pull: always
|
||
|
image: golang:1.11
|
||
|
commands:
|
||
|
- "go build -v -ldflags \"-X main.version=${DRONE_TAG##v} -X main.build=${DRONE_BUILD_NUMBER}\" -a -o release/linux/amd64/drone-s3-sync"
|
||
|
environment:
|
||
|
CGO_ENABLED: 0
|
||
|
GO111MODULE: on
|
||
|
when:
|
||
|
event:
|
||
|
- tag
|
||
|
|
||
|
- name: dryrun
|
||
|
pull: always
|
||
|
image: plugins/docker:linux-amd64
|
||
|
settings:
|
||
|
dockerfile: docker/Dockerfile.linux.amd64
|
||
|
dry_run: true
|
||
|
password:
|
||
|
from_secret: docker_password
|
||
|
repo: plugins/s3-sync
|
||
|
tags: linux-amd64
|
||
|
username:
|
||
|
from_secret: docker_username
|
||
|
when:
|
||
|
event:
|
||
|
- pull_request
|
||
|
|
||
|
- name: publish
|
||
|
pull: always
|
||
|
image: plugins/docker:linux-amd64
|
||
|
settings:
|
||
|
auto_tag: true
|
||
|
auto_tag_suffix: linux-amd64
|
||
|
dockerfile: docker/Dockerfile.linux.amd64
|
||
|
password:
|
||
|
from_secret: docker_password
|
||
|
repo: plugins/s3-sync
|
||
|
username:
|
||
|
from_secret: docker_username
|
||
|
when:
|
||
|
event:
|
||
|
- push
|
||
|
- tag
|
||
|
|
||
|
trigger:
|
||
|
branch:
|
||
|
- master
|