.github: workflow to update metadata (#257)

Provides a Github Actions Workflow which creates a PR to update third-party package metadata.

PR is created with a new "cadobot" Github App.
This commit is contained in:
Michael McLoughlin
2022-04-30 15:14:49 -07:00
committed by GitHub
parent b38c305466
commit f955ddf82a

45
.github/workflows/metadata.yml vendored Normal file
View File

@@ -0,0 +1,45 @@
name: metadata
permissions:
contents: read
on:
schedule:
- cron: "24 5 * * 0"
jobs:
update:
runs-on: ubuntu-latest
steps:
- name: Install Go
uses: actions/setup-go@37335c7bb261b353407cff977110895fa0b4f7d8 # v2.1.3
with:
go-version: 1.18.x
- name: Checkout code
uses: actions/checkout@5a4ac9002d0be2fb38bd78e4b4dbde5606d7042f # v2.3.4
with:
persist-credentials: false
- name: Bootstrap
run: ./script/bootstrap
- name: Update Package Metadata
working-directory: tests/thirdparty
run: go test -v -run Metadata -update -net -prjs projects.json
- name: Diff
run: git diff
- name: Generate
run: ./script/generate
- name: Diff
run: git diff
- name: Generate Bot Token
uses: tibdex/github-app-token@586e1a624db6a5a4ac2c53daeeded60c5e3d50fe # v1.5.2
id: bot
with:
app_id: ${{ secrets.APP_ID }}
private_key: ${{ secrets.APP_PRIVATE_KEY }}
- name: Create Pull Request
uses: peter-evans/create-pull-request@bd72e1b7922d417764d27d30768117ad7da78a0e # v4.0.2
with:
token: ${{ steps.bot.outputs.token }}
commit-message: "tests/thirdparty: update package metadata"
branch: auto-tests-thirdparty-update-metadata
base: master
delete-branch: true
title: "tests/thirdparty: update package metadata"
body: "Auto-generated update of third-party package metadata."