Add event trigger #37
3 changed files with 36 additions and 18 deletions
15
.woodpecker/.woodpecker.yml
Normal file
15
.woodpecker/.woodpecker.yml
Normal file
|
@ -0,0 +1,15 @@
|
||||||
|
---
|
||||||
|
when:
|
||||||
|
- event: push
|
||||||
|
branch: ci/fix_woodpecker
|
||||||
|
steps:
|
||||||
|
- name: build
|
||||||
|
image: debian
|
||||||
|
commands:
|
||||||
|
- echo "This is the build step"
|
||||||
|
- echo "binary-data-123" > executable
|
||||||
|
- name: a-test-step
|
||||||
|
image: golang:1.16
|
||||||
|
commands:
|
||||||
|
- echo "Testing ..."
|
||||||
|
- ./executable
|
15
.woodpecker/main.yaml
Normal file
15
.woodpecker/main.yaml
Normal file
|
@ -0,0 +1,15 @@
|
||||||
|
---
|
||||||
|
when:
|
||||||
|
event: [push]
|
||||||
|
branch: [ci/fix_woodpecker]
|
||||||
|
steps:
|
||||||
|
- name: build
|
||||||
|
image: debian
|
||||||
|
commands:
|
||||||
|
- echo "This is the build step"
|
||||||
|
- echo "binary-data-123" > executable
|
||||||
|
- name: a-test-step
|
||||||
|
image: golang:1.16
|
||||||
|
commands:
|
||||||
|
- echo "Testing ..."
|
||||||
|
- ./executable
|
|
@ -1,3 +1,9 @@
|
||||||
|
---
|
||||||
|
when:
|
||||||
|
event:
|
||||||
|
- push
|
||||||
|
- pull_request
|
||||||
|
branch: preprod
|
||||||
steps:
|
steps:
|
||||||
- name: build
|
- name: build
|
||||||
image: alpine:3.17.2
|
image: alpine:3.17.2
|
||||||
|
@ -5,24 +11,6 @@ steps:
|
||||||
- apk update
|
- apk update
|
||||||
- apk add zola
|
- apk add zola
|
||||||
- zola build
|
- zola build
|
||||||
|
|
||||||
- name: upload
|
|
||||||
when:
|
|
||||||
branch:
|
|
||||||
- main
|
|
||||||
image: plugins/s3
|
|
||||||
settings:
|
|
||||||
bucket: guide.deuxfleurs.fr
|
|
||||||
endpoint: https://garage.deuxfleurs.fr
|
|
||||||
region: garage
|
|
||||||
access_key:
|
|
||||||
from_secret: aws_access_key_id
|
|
||||||
secret_key:
|
|
||||||
from_secret: aws_secret_access_key
|
|
||||||
source: public/**/*
|
|
||||||
target: /
|
|
||||||
strip_prefix: public/
|
|
||||||
|
|
||||||
- name: upload
|
- name: upload
|
||||||
when:
|
when:
|
||||||
branch:
|
branch:
|
Loading…
Reference in a new issue