docker and CI
Some checks failed
ci/woodpecker/push/build Pipeline was successful
ci/woodpecker/push/dryrun Pipeline was successful
ci/woodpecker/push/publish-latest Pipeline was successful
ci/woodpecker/push/publish-tag Pipeline was successful
ci/woodpecker/pr/build Pipeline was successful
ci/woodpecker/pr/dryrun Pipeline failed
ci/woodpecker/pr/publish-tag unknown status
ci/woodpecker/pr/publish-latest unknown status

This commit is contained in:
2024-06-08 23:10:22 -04:00
parent 277fa92564
commit 642a554050
6 changed files with 75 additions and 1 deletions

12
.woodpecker/build.yaml Normal file
View File

@@ -0,0 +1,12 @@
steps:
build:
when:
branch: main
event: [push, pull_request]
image: golang
environment:
- CGO_ENABLED=0
- GOOS=linux
commands:
- go get
- go build

15
.woodpecker/dryrun.yaml Normal file
View File

@@ -0,0 +1,15 @@
steps:
dryrun:
image: woodpeckerci/plugin-docker-buildx
settings:
platforms: linux/amd64
dry_run: true
repo: gitea.michaelthomson.dev/${CI_REPO_OWNER}/go-todos-app
tags: latest
when:
branch: main
event: [push, pull_request]
depends_on:
- build

View File

@@ -0,0 +1,18 @@
steps:
publish-latest:
image: woodpeckerci/plugin-docker-buildx
settings:
platforms: linux/amd64
repo: gitea.michaelthomson.dev/${CI_REPO_OWNER}/go-todos-app
registry: gitea.michaelthomson.dev
tags: latest
username: ${CI_REPO_OWNER}
password:
from_secret: gitea_token
when:
branch: main
event: [push]
depends_on:
- build
- dryrun

View File

@@ -0,0 +1,19 @@
steps:
publish-tag:
image: woodpeckerci/plugin-docker-buildx
settings:
platforms: linux/amd64
repo: gitea.michaelthomson.dev/${CI_REPO_OWNER}/go-todos-app
registry: gitea.michaelthomson.dev
tags: ${CI_COMMIT_TAG}
username: ${CI_REPO_OWNER}
password:
from_secret: gitea_token
when:
event: tag
ref: refs/tags/v*
branch: main
depends_on:
- build
- dryrun