Update Inventory #187
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 Inventory | |
on: | |
workflow_dispatch: | |
schedule: | |
- cron: '00 4 * * 1-5' | |
permissions: | |
actions: write | |
contents: write | |
pull-requests: write | |
jobs: | |
update-dotnet-inventory: | |
name: Update .NET SDK inventory | |
runs-on: pub-hk-ubuntu-24.04-ip | |
steps: | |
- uses: actions/create-github-app-token@v1 | |
id: generate-token | |
with: | |
app-id: ${{ vars.LINGUIST_GH_APP_ID }} | |
private-key: ${{ secrets.LINGUIST_GH_PRIVATE_KEY }} | |
- name: Checkout Repo | |
uses: actions/checkout@v4 | |
- name: Update Rust toolchain | |
run: rustup update | |
- name: Rust cache | |
uses: Swatinem/[email protected] | |
- name: Rebuild Inventory | |
id: rebuild-inventory | |
run: cargo run --package inventory-updater buildpacks/dotnet/inventory.toml buildpacks/dotnet/CHANGELOG.md | |
- name: Create Pull Request | |
id: pr | |
uses: peter-evans/create-pull-request@v7 | |
with: | |
token: ${{ steps.generate-token.outputs.token }} | |
title: "Update .NET Inventory" | |
commit-message: "Update Inventory for heroku/dotnet" | |
committer: ${{ vars.LINGUIST_GH_APP_USERNAME }} <${{ vars.LINGUIST_GH_APP_EMAIL }}> | |
author: ${{ vars.LINGUIST_GH_APP_USERNAME }} <${{ vars.LINGUIST_GH_APP_EMAIL }}> | |
branch: update-dotnet-inventory | |
body: "Automated pull-request to update heroku/dotnet inventory" | |
- name: Configure PR | |
if: steps.pr.outputs.pull-request-operation == 'created' | |
env: | |
GH_TOKEN: ${{ steps.generate-token.outputs.token }} | |
run: gh pr merge --squash --auto "${{ steps.pr.outputs.pull-request-number }}" |