Update ovmf hashes #354
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 ovmf hashes | |
| on: | |
| workflow_dispatch: | |
| schedule: | |
| - cron: "0 0 * * *" | |
| pull_request: | |
| branches: | |
| - dev | |
| jobs: | |
| update-ovmf-hashes: | |
| name: Update omvf hashes | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: write | |
| pull-requests: write | |
| steps: | |
| - name: Generate GitHub App token | |
| id: generate-token | |
| uses: actions/create-github-app-token@v1 | |
| with: | |
| app-id: ${{ secrets.COMMITER_APP_ID }} | |
| private-key: ${{ secrets.COMMITER_APP_PRIVATE_KEY }} | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| with: | |
| token: ${{ steps.generate-token.outputs.token }} | |
| ref: ${{ github.event.pull_request.head.ref || 'dev' }} | |
| - name: Install Nix | |
| uses: cachix/install-nix-action@v27 | |
| with: | |
| nix_path: nixpkgs=channel:nixpkgs-unstable | |
| github_access_token: ${{ steps.generate-token.outputs.token }} | |
| - name: Setup Nix Magic Cache | |
| uses: DeterminateSystems/flakehub-cache-action@main | |
| - name: Update versions | |
| id: update | |
| env: | |
| GH_TOKEN: ${{ steps.generate-token.outputs.token }} | |
| run: | | |
| .github/update.sh --ci | |
| - name: Commit changes | |
| if: steps.update.outputs.should_update == 'true' | |
| env: | |
| GH_TOKEN: ${{ steps.generate-token.outputs.token }} | |
| HEAD_REF: ${{ github.event.pull_request.head.ref || 'dev' }} | |
| run: | | |
| git config --local user.email "[email protected]" | |
| git config --local user.name "GitHub Action" | |
| git add ovmf_sources.json | |
| git commit -m "${{ steps.update.outputs.commit_message }}" | |
| if [ "${{ github.event_name }}" = "pull_request" ]; then | |
| git fetch origin "$HEAD_REF" | |
| git push "https://x-access-token:[email protected]/$GITHUB_REPOSITORY.git" "HEAD:$HEAD_REF" | |
| else | |
| git push "https://x-access-token:[email protected]/$GITHUB_REPOSITORY.git" HEAD:dev | |
| fi |