CI #629
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: CI | |
| concurrency: | |
| group: ci-${{ github.head_ref || github.run_id }} | |
| cancel-in-progress: true | |
| on: | |
| push: | |
| branches: | |
| - master | |
| tags: | |
| - "*" | |
| pull_request: | |
| schedule: | |
| - cron: "0 10 * * *" # ~2am PST | |
| workflow_dispatch: | |
| inputs: | |
| debug_enabled: | |
| type: boolean | |
| description: "Run the build with tmate debugging enabled (https://github.com/marketplace/actions/debugging-with-tmate)" | |
| required: false | |
| default: false | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: read | |
| packages: write | |
| steps: | |
| - name: install grub utilities | |
| run: sudo apt-get install -y grub-efi grub2-common grub-efi-amd64-bin grub-efi-amd64 | |
| - name: install gdisk | |
| run: sudo apt-get install -y gdisk | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| - name: Setup Just | |
| uses: extractions/setup-just@v2 | |
| - name: Setup Oras | |
| uses: oras-project/setup-oras@v1 | |
| with: | |
| version: 1.2.0 | |
| - name: Build | |
| run: | | |
| just --timestamp build | |
| - name: Login to ghcr.io | |
| if: github.event_name == 'push' && contains(github.ref, 'refs/tags/') | |
| uses: docker/login-action@v3 | |
| with: | |
| registry: ghcr.io | |
| username: ${{ github.actor }} | |
| password: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Publish on a tag push | |
| if: github.event_name == 'push' && contains(github.ref, 'refs/tags/') | |
| run: | | |
| just --timestamp push | |
| - name: Setup tmate session for debug | |
| if: ${{ failure() && github.event_name == 'workflow_dispatch' && inputs.debug_enabled }} | |
| uses: mxschmitt/action-tmate@v3 | |
| timeout-minutes: 30 | |
| with: | |
| limit-access-to-actor: true |