1
0
mirror of https://github.com/goreleaser/goreleaser.git synced 2025-10-30 23:58:09 +02:00

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

This commit is contained in:
smaftoul
2019-03-14 13:13:12 +01:00
committed by Carlos Alexandro Becker
parent 9081caba5e
commit f56b9a8509
2 changed files with 11 additions and 2 deletions

View File

@@ -5,4 +5,13 @@ if [ -n "$DOCKER_USERNAME" ] && [ -n "$DOCKER_PASSWORD" ]; then
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 $@

View File

@@ -22,8 +22,8 @@ action "is-tag" {
action "goreleaser" {
uses = "docker://goreleaser/goreleaser"
secrets = [
"GITHUB_TOKEN",
# at least GITHUB_TOKEN is required, you may need more though
"GORELEASER_GITHUB_TOKEN",
# at least GORELEASER_GITHUB_TOKEN is required, you may need more though
"DOCKER_USERNAME",
"DOCKER_PASSWORD",
]