mirror of
https://github.com/SAP/jenkins-library.git
synced 2025-03-03 15:02:35 +02:00
Automate go dependency updates (#1393)
This commit is contained in:
parent
462a403d5c
commit
4028db18f7
32
.github/workflows/update-go-dependencies.yaml
vendored
Normal file
32
.github/workflows/update-go-dependencies.yaml
vendored
Normal file
@ -0,0 +1,32 @@
|
||||
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 after our weekly release, so we can update the dependencies for the new development cycle on the master branch.
|
||||
schedule:
|
||||
- cron: '0 10 * * 1'
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- uses: actions/setup-go@v1
|
||||
with:
|
||||
go-version: '1.13.x'
|
||||
- name: Perform update
|
||||
run: |
|
||||
git checkout -B gh-action-update-golang-dependencies
|
||||
go get -u
|
||||
go mod tidy
|
||||
git config --local user.email "action@github.com"
|
||||
git config --local user.name "GitHub Action"
|
||||
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:
|
||||
command: githubCreatePullRequest
|
||||
flags: --body="Update Go dependencies" --head=gh-action-update-golang-dependencies --title="Update Go dependencies" --token ${{ secrets.GITHUB_TOKEN }}
|
@ -11,3 +11,10 @@ steps:
|
||||
owner: 'SAP'
|
||||
repository: 'jenkins-library'
|
||||
releaseBodyHeader: ''
|
||||
githubCreatePullRequest:
|
||||
base: master
|
||||
owner: 'SAP'
|
||||
repository: 'jenkins-library'
|
||||
labels:
|
||||
- 'REVIEW'
|
||||
- 'go-piper'
|
||||
|
Loading…
x
Reference in New Issue
Block a user