Call pkg.go.dev when a new tag is pushed (force refresh)
Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
This commit is contained in:
Родитель
88368f24e1
Коммит
1b7891cd65
|
@ -9,14 +9,8 @@ jobs:
|
|||
update:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
-
|
||||
name: Set up Go
|
||||
uses: actions/setup-go@v2
|
||||
with:
|
||||
go-version: 1.16
|
||||
-
|
||||
name: Call pkg.go.dev
|
||||
run: |
|
||||
go get github.com/${GITHUB_REPOSITORY}@${GITHUB_REF#refs/tags/}
|
||||
env:
|
||||
GOPROXY: https://proxy.golang.org
|
||||
uses: docker/bake-action@v1
|
||||
with:
|
||||
targets: godev
|
||||
|
|
|
@ -45,3 +45,16 @@ target "test" {
|
|||
target = "test-coverage"
|
||||
output = ["."]
|
||||
}
|
||||
|
||||
variable "GITHUB_REPOSITORY" {}
|
||||
variable "GITHUB_REF" {}
|
||||
target "godev" {
|
||||
args = {
|
||||
GO_VERSION = GO_VERSION
|
||||
GITHUB_REPOSITORY = GITHUB_REPOSITORY
|
||||
GITHUB_REF = GITHUB_REF
|
||||
}
|
||||
dockerfile = "./hack/godev.Dockerfile"
|
||||
target = "godev"
|
||||
output = ["type=cacheonly"]
|
||||
}
|
||||
|
|
|
@ -0,0 +1,11 @@
|
|||
# syntax=docker/dockerfile:1.3
|
||||
ARG GO_VERSION
|
||||
ARG GITHUB_REPOSITORY
|
||||
ARG GITHUB_REF
|
||||
|
||||
FROM golang:${GO_VERSION}-alpine AS godev
|
||||
ARG GITHUB_REPOSITORY
|
||||
ARG GITHUB_REF
|
||||
ENV GOPROXY=https://proxy.golang.org
|
||||
RUN if [ -z "${GITHUB_REPOSITORY}" -o -z "${GITHUB_REF}" ]; then echo >&2 "GITHUB_REPOSITORY and GITHUB_REF required"; exit 1; fi; \
|
||||
go get github.com/${GITHUB_REPOSITORY}@${GITHUB_REF#refs/tags/}
|
|
@ -1,4 +1,4 @@
|
|||
# syntax=docker/dockerfile:1.2
|
||||
# syntax=docker/dockerfile:1.3
|
||||
ARG GO_VERSION
|
||||
|
||||
FROM golang:${GO_VERSION}-alpine AS base
|
||||
|
|
Загрузка…
Ссылка в новой задаче