Update Packages #30
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
| name: Update Packages | |
| on: | |
| schedule: | |
| - cron: "0 3 * * *" # Daily at 3am UTC | |
| workflow_dispatch: | |
| inputs: | |
| package: | |
| description: "Package to update (leave empty for all)" | |
| required: false | |
| type: string | |
| jobs: | |
| update-packages: | |
| runs-on: ubuntu-slim | |
| permissions: | |
| contents: write | |
| pull-requests: write | |
| steps: | |
| - name: Generate GitHub App Token | |
| id: app-token | |
| uses: actions/create-github-app-token@v2 | |
| with: | |
| app-id: ${{ secrets.APP_ID }} | |
| private-key: ${{ secrets.APP_PRIVATE_KEY }} | |
| - name: Checkout repository | |
| uses: actions/checkout@v6 | |
| with: | |
| token: ${{ steps.app-token.outputs.token }} | |
| - name: Setup Nix | |
| uses: NixOS/nix-installer@main | |
| - name: Setup GitHub CLI | |
| run: | | |
| echo "${{ steps.app-token.outputs.token }}" | gh auth login --with-token | |
| - name: Update packages | |
| run: | | |
| if [ -n "${{ inputs.package }}" ]; then | |
| nix run .#updater -- --pr -p "${{ inputs.package }}" | |
| else | |
| nix run .#updater -- --pr | |
| fi |