Compare commits

..

1 commit

Author SHA1 Message Date
c8bbd4f260 fix: correctly use secrets for woodpecker
All checks were successful
ci/woodpecker/pr/woodpecker Pipeline was successful
ci/woodpecker/push/woodpecker Pipeline was successful
2023-10-22 12:06:08 +02:00
3 changed files with 47 additions and 26 deletions

2
.gitignore vendored
View file

@ -23,5 +23,3 @@ go.work
# Go build file
**/build/
.vscode

View file

@ -1,5 +1,23 @@
---
# Test building the code and docker image
kind: pipeline
type: docker
name: test-build
steps:
docker-build-only:
- name: go-test
image: golang
commands:
- make -C polyculeconnect test
depends_on:
- name: go-build
image: golang
commands:
- make -C polyculeconnect build
depends_on:
- name: docker-build-only
image: woodpeckerci/plugin-docker-buildx
privileged: true
settings:
@ -9,14 +27,13 @@ steps:
platforms:
- linux/amd64
# - linux/arm64
depends_on:
when:
- event: pull_request
repo: polyculeconnect/polyculeconnect
- event: push
branch:
exclude: [main]
branch:
exclude:
- main
docker-build-push:
- name: docker-build-push
image: woodpeckerci/plugin-docker-buildx
privileged: true
settings:
@ -30,11 +47,28 @@ steps:
platforms:
- linux/amd64
# - linux/arm64
depends_on:
- go-test
- go-build
when:
- event: push
branch: main
branch:
- main
docker-push-tag:
trigger:
event:
- push
- tag
---
# On a tag, only build the related docker image
kind: pipeline
type: docker
name: tag-release
depends_on:
- test-build
steps:
- name: docker-push-tag
image: woodpeckerci/plugin-docker-buildx
privileged: true
settings:
@ -48,8 +82,7 @@ steps:
from_secret: git_username
password:
from_secret: git_password
when:
- event: tag
depends_on:
- test
trigger:
event:
- tag

View file

@ -1,10 +0,0 @@
steps:
go-test:
image: golang
commands:
- make -C polyculeconnect test
go-build:
image: golang
commands:
- make -C polyculeconnect build