fix: Allow brew with github actions (#982) (#983)

This commit is contained in:
smaftoul
2019-03-14 09:13:12 -03:00
committed by Carlos Alexandro Becker
parent 9081caba5e
commit f56b9a8509
2 changed files with 11 additions and 2 deletions
+9
View File
@@ -5,4 +5,13 @@ if [ -n "$DOCKER_USERNAME" ] && [ -n "$DOCKER_PASSWORD" ]; then
docker login -u $DOCKER_USERNAME -p $DOCKER_PASSWORD $DOCKER_REGISTRY docker login -u $DOCKER_USERNAME -p $DOCKER_PASSWORD $DOCKER_REGISTRY
fi 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 $@ goreleaser $@
+2 -2
View File
@@ -22,8 +22,8 @@ action "is-tag" {
action "goreleaser" { action "goreleaser" {
uses = "docker://goreleaser/goreleaser" uses = "docker://goreleaser/goreleaser"
secrets = [ secrets = [
"GITHUB_TOKEN", "GORELEASER_GITHUB_TOKEN",
# at least GITHUB_TOKEN is required, you may need more though # at least GORELEASER_GITHUB_TOKEN is required, you may need more though
"DOCKER_USERNAME", "DOCKER_USERNAME",
"DOCKER_PASSWORD", "DOCKER_PASSWORD",
] ]