Update Vendor Branch #22
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Update Vendor Branch | |
on: | |
workflow_dispatch: | |
schedule: | |
- cron: '0 0 * * *' | |
jobs: | |
create-vendor-bump-PR: | |
name: Update Vendor Branch | |
runs-on: ubuntu-latest | |
steps: | |
- name: Setup Golang | |
uses: actions/setup-go@v4 | |
with: | |
go-version: '1.20' | |
- name: Checkout 'main' branch | |
uses: actions/checkout@v3 | |
with: | |
ref: main | |
path: .main | |
- name: Run 'go mod download' | |
working-directory: .main | |
run: | | |
go mod download | |
- name: Run 'go mod vendor' | |
working-directory: .main | |
run: | | |
go mod vendor | |
- name: Checkout 'vendor' branch | |
uses: actions/checkout@v3 | |
with: | |
ref: vendor | |
path: .vendor | |
- name: Copy vendoring data to 'vendor' branch | |
run: | | |
cp .main/go.mod .vendor/go.mod | |
cp .main/go.sum .vendor/go.sum | |
cp -a .main/vendor .vendor/ | |
- name: Create Pull Request | |
uses: peter-evans/create-pull-request@v5 | |
with: | |
token: ${{ secrets.GITHUB_TOKEN }} | |
path: .vendor | |
commit-message: 'Update vendor dependencies' | |
title: 'Update vendor dependencies' | |
base: vendor | |
branch: 'update-vendor-${{ github.run_number }}' | |
draft: false |