1
0
mirror of https://github.com/amir20/dozzle.git synced 2026-01-04 20:14:59 +01:00

Fixes releaser

This commit is contained in:
Amir
2019-03-18 09:27:56 -07:00
parent 3772d36e41
commit b7004b2068
3 changed files with 31 additions and 5 deletions

9
.github/goreleaser/Dockerfile vendored Normal file
View File

@@ -0,0 +1,9 @@
FROM goreleaser/goreleaser:v0.103
RUN go get -u github.com/gobuffalo/packr/packr
RUN apk --no-cache add nodejs-current nodejs-npm && npm i -g npm
COPY entrypoint.sh /entrypoint.sh
ENTRYPOINT ["/entrypoint.sh"]
CMD [""]

17
.github/goreleaser/entrypoint.sh vendored Executable file
View File

@@ -0,0 +1,17 @@
#!/usr/bin/env bash
if [ -n "$DOCKER_USERNAME" ] && [ -n "$DOCKER_PASSWORD" ]; then
echo "Login to the docker..."
docker login -u $DOCKER_USERNAME -p $DOCKER_PASSWORD $DOCKER_REGISTRY
fi
# Workaround for github actions when access to different repositories is needed.
# Github actions provides a GITHUB_TOKEN secret that can only access the current
# repository and you cannot configure it's value.
# Access to different repositories is needed by brew for example.
if [ -n "$GORELEASER_GITHUB_TOKEN" ] ; then
export GITHUB_TOKEN=$GORELEASER_GITHUB_TOKEN
fi
goreleaser $@

10
.github/main.workflow vendored
View File

@@ -1,22 +1,22 @@
workflow "Release" {
on = "push"
resolves = [
"goreleaser/goreleaser",
"release",
]
}
action "go-build" {
action "test" {
uses = "./.github/golang/"
}
action "is-tag" {
uses = "actions/bin/filter@master"
needs = ["go-build"]
needs = ["test"]
args = "tag"
}
action "goreleaser/goreleaser" {
uses = "docker://goreleaser/goreleaser"
action "release" {
uses = "./.github/goreleaser/"
needs = ["is-tag"]
args = "release"
}