summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorAdin Scannell <ascannell@google.com>2020-05-27 10:47:42 -0700
committergVisor bot <gvisor-bot@google.com>2020-05-27 10:49:04 -0700
commit0bc022b7f3c13bb7c5c8d47d1781820161e7b1ad (patch)
tree09f3bcc163d1bcea09bc2165494a34cc6bda5897
parentf47598d4ca696d1c404fe6f2333555477398ce6b (diff)
Fix push for Go branch.
PiperOrigin-RevId: 313419745
-rw-r--r--.github/workflows/go.yml10
1 files changed, 6 insertions, 4 deletions
diff --git a/.github/workflows/go.yml b/.github/workflows/go.yml
index 744d25c92..10c86f5cd 100644
--- a/.github/workflows/go.yml
+++ b/.github/workflows/go.yml
@@ -19,6 +19,12 @@ jobs:
"${{ github.event.pull_request.statuses_url }}"
if: github.event_name == 'pull_request'
- uses: actions/checkout@v2
+ if: github.event_name == 'push'
+ with:
+ fetch-depth: 0
+ token: '${{ secrets.GO_TOKEN }}'
+ - uses: actions/checkout@v2
+ if: github.event_name == 'pull_request'
with:
fetch-depth: 0
- uses: actions/setup-go@v2
@@ -42,10 +48,6 @@ jobs:
- run: go build ./...
- if: github.event_name == 'push'
run: |
- # Required dedicated credentials for the Go branch, due to the way
- # branch protection rules are configured.
- git config --global credential.helper cache
- echo -e "protocol=https\nhost=github.com\nusername=${{ secrets.GO_TOKEN }}\npassword=x-oauth-basic" | git credential approve
git remote add upstream "https://github.com/${{ github.repository }}"
git push upstream go:go
- if: ${{ success() && github.event_name == 'pull_request' }}