Use goproxy
All checks were successful
ci/woodpecker/push/test Pipeline was successful
ci/woodpecker/push/deploy Pipeline was successful

This commit is contained in:
chapeau 2023-10-22 22:13:14 +02:00
parent 3bc17d6aba
commit 4d0be8fe49
3 changed files with 17 additions and 0 deletions

View file

@ -6,9 +6,13 @@ steps:
repo: git.faercol.me/polyculeconnect/polyculeconnect repo: git.faercol.me/polyculeconnect/polyculeconnect
tags: latest tags: latest
dry_run: true dry_run: true
build_args_from_env:
- GOPROXY
platforms: platforms:
- linux/amd64 - linux/amd64
# - linux/arm64 # - linux/arm64
environment:
- GOPROXY=http://goproxy.home:3000
when: when:
- event: pull_request - event: pull_request
- event: push - event: push
@ -22,6 +26,8 @@ steps:
repo: git.faercol.me/polyculeconnect/polyculeconnect repo: git.faercol.me/polyculeconnect/polyculeconnect
registry: git.faercol.me registry: git.faercol.me
tags: latest tags: latest
build_args_from_env:
- GOPROXY
username: username:
from_secret: git_username from_secret: git_username
password: password:
@ -29,6 +35,8 @@ steps:
platforms: platforms:
- linux/amd64 - linux/amd64
# - linux/arm64 # - linux/arm64
environment:
- GOPROXY=http://goproxy.home:3000
when: when:
- event: push - event: push
branch: main branch: main
@ -40,6 +48,8 @@ steps:
registry: git.faercol.me registry: git.faercol.me
repo: git.faercol.me/polyculeconnect/polyculeconnect repo: git.faercol.me/polyculeconnect/polyculeconnect
auto_tag: true auto_tag: true
build_args_from_env:
- GOPROXY
platforms: platforms:
- linux/amd64 - linux/amd64
# - linux/arm64 # - linux/arm64
@ -47,6 +57,8 @@ steps:
from_secret: git_username from_secret: git_username
password: password:
from_secret: git_password from_secret: git_password
environment:
- GOPROXY=http://goproxy.home:3000
when: when:
- event: tag - event: tag

View file

@ -3,11 +3,15 @@ steps:
image: golang image: golang
commands: commands:
- make -C polyculeconnect test - make -C polyculeconnect test
environment:
- GOPROXY=http://goproxy.home:3000
go-build: go-build:
image: golang image: golang
commands: commands:
- make -C polyculeconnect build - make -C polyculeconnect build
environment:
- GOPROXY=http://goproxy.home:3000
when: when:
event: [push, tag] event: [push, tag]

View file

@ -1,6 +1,7 @@
FROM --platform=$TARGETPLATFORM golang:1.20 AS builder FROM --platform=$TARGETPLATFORM golang:1.20 AS builder
ARG TARGETPLATFORM ARG TARGETPLATFORM
ARG BUILDPLATFORM ARG BUILDPLATFORM
ARG GOPROXY
WORKDIR /go/src/git.faercol.me/polyculeconnect WORKDIR /go/src/git.faercol.me/polyculeconnect
COPY polyculeconnect ./ COPY polyculeconnect ./
RUN make build RUN make build