Skip to content

Fetch references

Fetch references #177

Workflow file for this run

name: Fetch references
on:
schedule:
# At 7:00 EST (12:00 UTC) on every day-of-week from Monday through Friday. https://crontab.guru/#0_12_*_*_1-5
- cron: "0 12 * * 1-5"
workflow_dispatch:
jobs:
fetch-references:
runs-on: ubuntu-22.04
if: github.repository == 'bufbuild/modules'
steps:
- name: Generate token
id: generate_token
uses: tibdex/github-app-token@b62528385c34dbc9f38e5f4225ac829252d1ea92
with:
app_id: 295926
private_key: ${{ secrets.TOKEN_EXCHANGE_GH_APP_PRIVATE_KEY }}
repository: ${{ github.repository }}
permissions: >-
{"contents": "write", "pull_requests": "write", "members": "read"}
- name: Checkout repository code
uses: actions/checkout@v3
- name: Install Go
uses: actions/setup-go@v4
with:
go-version: 1.20.x
check-latest: true
cache: true
- name: Install buf cli
run: |
go install github.com/bufbuild/buf/cmd/buf@main
- name: Fetch references
run: |
bash ./scripts/fetch.sh
env:
BUF_USER: ${{ secrets.BUF_USER }}
BUF_TOKEN: ${{ secrets.BUF_TOKEN }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Create PR
uses: peter-evans/create-pull-request@153407881ec5c347639a548ade7d8ad1d6740e38
with:
add-paths: ./modules/sync/**
commit-message: "Detected new managed modules references"
branch: fetch-versions-${{ github.run_id }}
delete-branch: true
title: "Found new managed modules references"
body: "New managed modules references found. Please review."
team-reviewers: bufbuild/bsr-team
token: ${{ steps.generate_token.outputs.token }}