ArgParser: accumulate key-value entries into Map fields #156
Workflow file for this run
This file contains hidden or 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
| # yaml-language-server: $schema=https://raw.githubusercontent.com/SchemaStore/schemastore/master/src/schemas/json/github-workflow.json | |
| name: Update Nix deps for Dependabot PRs | |
| on: | |
| pull_request: | |
| paths: | |
| - '**/*.fsproj' | |
| - '**/Directory.Packages.props' | |
| jobs: | |
| update-nix-deps: | |
| # Only run on Dependabot PRs from the same repository | |
| if: github.actor == 'dependabot[bot]' && github.event.pull_request.head.repo.full_name == github.repository | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: read | |
| steps: | |
| - name: Create token | |
| id: generate-token | |
| uses: actions/create-github-app-token@bcd2ba49218906704ab6c1aa796996da409d3eb1 # v3 | |
| with: | |
| app-id: ${{ secrets.DEPS_UPDATER_CLIENT_APP_ID }} | |
| private-key: ${{ secrets.DEPS_UPDATER_PRIVATE_KEY }} | |
| - name: Check out repository | |
| uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 | |
| with: | |
| ref: ${{ github.event.pull_request.head.ref }} | |
| repository: ${{ github.event.pull_request.head.repo.full_name }} | |
| token: ${{ steps.generate-token.outputs.token }} | |
| fetch-depth: 0 | |
| - name: Get GitHub App bot user ID | |
| id: get-user-id | |
| env: | |
| GH_TOKEN: ${{ steps.generate-token.outputs.token }} | |
| run: echo "user-id=$(gh api '/users/${{ steps.generate-token.outputs.app-slug }}[bot]' --jq .id)" >> "$GITHUB_OUTPUT" | |
| - name: Install Nix | |
| uses: DeterminateSystems/nix-installer-action@1d87d45818068401a10cf16bdc5f00b24994a83f # main | |
| with: | |
| github-token: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Build fetch-deps | |
| run: nix build ".#default.fetch-deps" | |
| - name: Run fetch-deps | |
| run: | | |
| set -o pipefail | |
| ./result nix/deps.json | |
| - name: Check for changes | |
| id: git-check | |
| run: | | |
| if git diff --quiet nix/deps.json; then | |
| echo "changed=false" >> $GITHUB_OUTPUT | |
| else | |
| echo "changed=true" >> $GITHUB_OUTPUT | |
| fi | |
| - name: Commit and push | |
| if: steps.git-check.outputs.changed == 'true' | |
| run: | | |
| git config user.name "${{ steps.generate-token.outputs.app-slug }}[bot]" | |
| git config user.email "${{ steps.get-user-id.outputs.user-id }}+${{ steps.generate-token.outputs.app-slug }}[bot]@users.noreply.github.com" | |
| git add nix/deps.json | |
| git commit -m "Update nix/deps.json for Dependabot changes" | |
| git push |