diff --git a/scripts/entrypoint.sh b/scripts/entrypoint.sh index ba81cc267..e7b2c5f58 100644 --- a/scripts/entrypoint.sh +++ b/scripts/entrypoint.sh @@ -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 $@ diff --git a/www/content/actions.md b/www/content/actions.md index 260c14428..6a813c49f 100644 --- a/www/content/actions.md +++ b/www/content/actions.md @@ -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", ]