summaryrefslogtreecommitdiffhomepage
path: root/.github/workflows
AgeCommit message (Collapse)Author
2021-03-11Update go.ymlSeth Vargo
2021-03-10Improve Actions hygieneSeth Vargo
👋 hello there! I'm a fellow Googler who works on projects that leverage GitHub Actions for CI/CD. Recently I noticed a large increase in our queue time, and I've tracked it down to the [limit of 180 concurrent jobs](https://docs.github.com/en/actions/reference/usage-limits-billing-and-administration) for an organization. To help be better citizens, I'm proposing changes across a few repositories that will reduce GitHub Actions hours and consumption. I hope these changes are reasonable and I'm happy to talk through them in more detail. - (**you were already doing this, thank you!**) Only run GitHub Actions for pushes and PRs against the main branch of the repository. If your team uses a forking model, this change will not affect you. If your team pushes branches to the repository directly, this changes actions to only run against the primary branches or if you open a Pull Request against a primary branch. - For long-running jobs (especially tests), I added the "Cancel previous" workflow. This is very helpful to prevent a large queue backlog when you are doing rapid development and pushing multiple commits. Without this, GitHub Actions' default behavior is to run all actions on all commits. There are other changes you could make, depending on your project (but I'm not an expert): - If you have tests that should only run when a subset of code changes, consider gating your workflow to particular file paths. For example, we have some jobs that do Terraform linting, but [they only run when Terraform files are changed](https://github.com/google/exposure-notifications-verification-server/blob/c4f59fee71042cf668747e599e7c769fca736554/.github/workflows/terraform.yml#L3-L11). Hopefully these changes are not too controversial and also hopefully you can see how this would reduce actions consumption to be good citizens to fellow Googlers. If you have any questions, feel free to respond here or ping me on chat. Thank you!
2021-01-12Fix Go branch building.Adin Scannell
Files removed from the working tree were not being properly removed from the branch, leading to symbol conflicts while building. This requires the change to 'git add --all' in the tools/go_branch.sh script. But why was this not caught by CI? The "git clean -f" command by default only cleans files in the current working directory. In order to clean the whole tree recursively, we need to specify a pathspec, which is ".". In addition to these fixes, re-add the "go tests" command to help prevent this from happening again, since merges on the Go branch will happen in GitHub actions for simplicity. The Go test is retained in BuildKite. PiperOrigin-RevId: 351503804
2021-01-11Fix Go branch for arm64.Adin Scannell
This requires several changes: * Templates must preserve relevant tags. * Pagetables templates are split into two targets, each preserving tags. * The binary VDSO is similarly split into two targets, with some juggling. * The top level tools/go_branch.sh now does a crossbuild of ARM64 as well, and checks and merges the results of the two branches together. Fixes #5178 PiperOrigin-RevId: 351304330
2021-01-05Change the build badge to point to BuildKite.Adin Scannell
PiperOrigin-RevId: 350197814
2021-01-05Add YAML validation for configuration files.Adin Scannell
For validation, the "on" key in existing YAML files is changed to a literal string. In the YAML spec, on is a keyword which encodes a boolean value, so without relying on a specific implementation the YAML files are technically not encoding an object that complies with the specification. PiperOrigin-RevId: 350172147
2020-12-28Avoid duplicate `run` keyTamir Duberstein
This GitHub action has been failing since 4e963c9. PiperOrigin-RevId: 349327675
2020-12-15Cleanup GitHub actions workflows.Adin Scannell
Also, drop the pull_request template, since this has not proved to be helpful, and just results in a commit message the includes the list. PiperOrigin-RevId: 347636507
2020-09-29Add nogo check annotations to GitHub.Adin Scannell
When nogo checks are violated, they will automatically posted as annotations on the specific GitHub commit. This allows us to ensure analysis & style rules and have them called out. PiperOrigin-RevId: 334447285
2020-09-09github: Don't build the Go branch for feature branchesAndrei Vagin
We can't actually push the Go branch on pushes to feature branches. Signed-off-by: Andrei Vagin <avagin@google.com>
2020-09-09github: run actions for feature branchesAndrei Vagin
Signed-off-by: Andrei Vagin <avagin@google.com>
2020-08-19Run bazel build before deleting cached gopath filesFabricio Voznika
bazel creates sysmlink to the cache on the first invokation. On a new clone, there are no symlink, thus `rm -rf bazel-bin/gopath` has no effect. Call `bazel build something` first, then delete cached gopath. PiperOrigin-RevId: 327536044
2020-08-03Fix syntax error in issue_reviver.Adin Scannell
PiperOrigin-RevId: 324642975
2020-08-03Include shim binaries in the Go branch.Adin Scannell
PiperOrigin-RevId: 324615016
2020-07-31Use proper set-output syntax.Adin Scannell
PiperOrigin-RevId: 324302828
2020-07-30Fix merge flow for Go branch.Adin Scannell
PiperOrigin-RevId: 324024075
2020-07-28Don't attempt to use the secret if it does not exist.Adin Scannell
Fixes #3326 PiperOrigin-RevId: 323589669
2020-07-13Don't run issue reviver on forks.Ian Lewis
Add a conditional to avoid running the issue reviver on forks. It will always cause errors since bug references in the source code don't match issue IDs in forked repos. PiperOrigin-RevId: 321042060
2020-06-05Add stale issue & PR cleanup.Adin Scannell
PiperOrigin-RevId: 315020368
2020-05-27Fix push for Go branch.Adin Scannell
PiperOrigin-RevId: 313419745
2020-05-20Normalize permissions in the go branch.Adin Scannell
Fixes #2722
2020-05-18Add simplified badge and Build workflow.Adin Scannell
PiperOrigin-RevId: 312159017
2020-05-18Implement Go branch updater with GitHub actions.Adin Scannell
PiperOrigin-RevId: 312155686
2020-05-14Run issue_reviver via GitHub.Adin Scannell
PiperOrigin-RevId: 311600872
2020-05-01Run labeller only for non-forked pull requests.Adin Scannell
Otherwise the labeller will generate an error each time. PiperOrigin-RevId: 309505731
2020-04-23Add basic GitHub labeler workflow.Adin Scannell
This is the first automated GitHub actions workflow, and it simply applies labels to pull request in a best-effort fashion. PiperOrigin-RevId: 308112191