Skip to content

Update Vendor Branch #23

Update Vendor Branch

Update Vendor Branch #23

Workflow file for this run

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