mirror of
https://github.com/amir20/dozzle.git
synced 2026-01-04 20:14:59 +01:00
Fixes releaser
This commit is contained in:
9
.github/goreleaser/Dockerfile
vendored
Normal file
9
.github/goreleaser/Dockerfile
vendored
Normal 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
17
.github/goreleaser/entrypoint.sh
vendored
Executable 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
10
.github/main.workflow
vendored
@@ -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"
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user