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 # Go build file
**/build/ **/build/
.vscode

View file

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