summaryrefslogtreecommitdiffhomepage
path: root/.github/workflows/go.yml
diff options
context:
space:
mode:
authorgVisor bot <gvisor-bot@google.com>2020-05-27 09:32:50 -0700
committergVisor bot <gvisor-bot@google.com>2020-05-27 09:32:50 -0700
commitc826bb350204971bc1e893b71c0ae572e7ce4cc6 (patch)
tree27a8991ace01aefd43df12dd1e5b6773fce1675f /.github/workflows/go.yml
parente028714a0dd390b2321c4beeac62c5b2904cd917 (diff)
parent8437ef752d3c8e90327edad0164f3e4d003821c8 (diff)
Merge pull request #2748 from amscanne:go_branch
PiperOrigin-RevId: 313404235
Diffstat (limited to '.github/workflows/go.yml')
-rw-r--r--.github/workflows/go.yml5
1 files changed, 3 insertions, 2 deletions
diff --git a/.github/workflows/go.yml b/.github/workflows/go.yml
index 60704f144..744d25c92 100644
--- a/.github/workflows/go.yml
+++ b/.github/workflows/go.yml
@@ -17,6 +17,7 @@ jobs:
-H "Content-Type: application/json" \
-H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" \
"${{ github.event.pull_request.statuses_url }}"
+ if: github.event_name == 'pull_request'
- uses: actions/checkout@v2
with:
fetch-depth: 0
@@ -47,14 +48,14 @@ jobs:
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() }}
+ - if: ${{ success() && github.event_name == 'pull_request' }}
run: |
jq -nc '{"state": "success", "context": "go tests"}' | \
curl -sL -X POST -d @- \
-H "Content-Type: application/json" \
-H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" \
"${{ github.event.pull_request.statuses_url }}"
- - if: ${{ failure() }}
+ - if: ${{ failure() && github.event_name == 'pull_request' }}
run: |
jq -nc '{"state": "failure", "context": "go tests"}' | \
curl -sL -X POST -d @- \