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
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:
parent
277fa92564
commit
642a554050
12
.woodpecker/build.yaml
Normal file
12
.woodpecker/build.yaml
Normal 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
15
.woodpecker/dryrun.yaml
Normal 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
|
||||
|
18
.woodpecker/publish-latest.yaml
Normal file
18
.woodpecker/publish-latest.yaml
Normal 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
|
19
.woodpecker/publish-tag.yaml
Normal file
19
.woodpecker/publish-tag.yaml
Normal 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
|
10
Dockerfile
Normal file
10
Dockerfile
Normal file
@ -0,0 +1,10 @@
|
||||
# syntax=docker/dockerfile:1
|
||||
|
||||
FROM golang:1.22-alpine
|
||||
WORKDIR /app
|
||||
COPY go.mod go.sum ./
|
||||
RUN go mod download
|
||||
COPY . ./
|
||||
RUN CGO_ENABLED=0 GOOS=linux go build -o /entrypoint
|
||||
EXPOSE 3000
|
||||
ENTRYPOINT ["/entrypoint"]
|
Loading…
x
Reference in New Issue
Block a user