Update Go checks to run on pull_requests (#12166)

Currently go-test and go-validate only run for users who have push
access to the Packer repo. We want to ensure tests and validation run
for all opened pull requests including public forks.
This commit is contained in:
Wilken Rivera 2022-12-16 11:35:41 -05:00 committed by GitHub
parent a6e7635d05
commit 50a356529a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 10 additions and 2 deletions

View file

@ -5,7 +5,11 @@
name: "Go Test"
on: [ workflow_dispatch, push ]
on:
push:
branches:
- 'main'
pull_request:
env:
PACKER_GITHUB_API_TOKEN: ${{ secrets.GITHUB_TOKEN }}

View file

@ -4,7 +4,11 @@
name: "Go Validate"
on: [ workflow_dispatch, push ]
on:
push:
branches:
- 'main'
pull_request:
permissions:
contents: read