| 1 |
name: metadata |
| 2 |
permissions: |
| 3 |
contents: read |
| 4 |
on: |
| 5 |
workflow_dispatch: |
| 6 |
schedule: |
| 7 |
- cron: "24 5 1 * *" |
| 8 |
jobs: |
| 9 |
update: |
| 10 |
runs-on: ubuntu-latest |
| 11 |
steps: |
| 12 |
- name: Install Go |
| 13 |
uses: actions/setup-go@c4a742cab115ed795e34d4513e2cf7d472deb55f |
| 14 |
with: |
| 15 |
go-version: 1.21.x |
| 16 |
- name: Checkout code |
| 17 |
uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8 |
| 18 |
with: |
| 19 |
persist-credentials: false |
| 20 |
- name: Bootstrap |
| 21 |
run: ./script/bootstrap |
| 22 |
- name: Generate App Token |
| 23 |
uses: tibdex/github-app-token@021a2405c7f990db57f5eae5397423dcc554159c |
| 24 |
id: app |
| 25 |
with: |
| 26 |
app_id: ${{ secrets.APP_ID }} |
| 27 |
private_key: ${{ secrets.APP_PRIVATE_KEY }} |
| 28 |
- name: Update Package Metadata |
| 29 |
env: |
| 30 |
GITHUB_TOKEN: ${{ steps.app.outputs.token }} |
| 31 |
run: ./script/metadata |
| 32 |
- name: Diff |
| 33 |
run: git diff |
| 34 |
- name: Generate |
| 35 |
run: ./script/generate |
| 36 |
- name: Diff |
| 37 |
run: git diff |
| 38 |
- name: Create Pull Request |
| 39 |
uses: ./.github/actions/create-pull-request |
| 40 |
with: |
| 41 |
app_id: ${{ secrets.APP_ID }} |
| 42 |
app_private_key: ${{ secrets.APP_PRIVATE_KEY }} |
| 43 |
branch: auto-tests-thirdparty-update-metadata |
| 44 |
title: "tests/thirdparty: update package metadata" |
| 45 |
body: "Auto-generated update of third-party package metadata." |