mirror of
https://github.com/SAP/jenkins-library.git
synced 2024-12-14 11:03:09 +02:00
485faed812
* Update go to 1.15 to reduce binary size Go made improvements to reduce binary size, cf https://golang.org/doc/go1.15 > Go 1.15 reduces typical binary sizes by around 5% compared to Go 1.14 by eliminating certain types of GC metadata and more aggressively eliminating unused type metadata. In my test, this equates to about 3 mb diff between Go 1.13 and Go 1.15: -rwxr-xr-x 1 root root 36M Aug 31 14:43 piper-go-113 -rwxr-xr-x 1 root root 33M Aug 31 14:44 piper-go-115 * Go Generate * go mod tidy Co-authored-by: Stephan Aßmus <stephan.assmus@sap.com> Co-authored-by: Oliver Nocon <33484802+OliverNocon@users.noreply.github.com>
34 lines
1.3 KiB
YAML
34 lines
1.3 KiB
YAML
name: Update go dependencies and create PR
|
|
|
|
on:
|
|
# Allow to trigger this manually just in case updates are required outside of the schedule. See https://goobar.io/2019/12/07/manually-trigger-a-github-actions-workflow/ for info on how that works.
|
|
repository_dispatch:
|
|
types: update-dependencies
|
|
# Schedule once a month
|
|
schedule:
|
|
- cron: '0 10 3 * *'
|
|
|
|
jobs:
|
|
build:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
- uses: actions/setup-go@v1
|
|
with:
|
|
go-version: '1.15.x'
|
|
- name: Perform update
|
|
run: |
|
|
git checkout -B gh-action-update-golang-dependencies
|
|
go get -u
|
|
go mod tidy
|
|
git config --local user.email "41898282+github-actions[bot]@users.noreply.github.com"
|
|
git config --local user.name "github-actions[bot]"
|
|
git commit -am "Automated go dependency update"
|
|
git push origin gh-action-update-golang-dependencies -f
|
|
- name: Create Pull Request
|
|
uses: SAP/project-piper-action@master
|
|
with:
|
|
piper-version: master
|
|
command: githubCreatePullRequest
|
|
flags: --body="Automated update for Go dependencies by running `go get -u` and `go mod tidy`" --head=gh-action-update-golang-dependencies --title="Update Go dependencies" --token ${{ secrets.GO_DEPENDENCY_UPDATE_TOKEN }}
|