push-to-cachix #6
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: push-to-cachix | |
| on: | |
| workflow_dispatch: | |
| inputs: | |
| environment: | |
| description: Select environment | |
| required: true | |
| type: choice | |
| options: | |
| - hooreique | |
| jobs: | |
| push-to-cachix: | |
| runs-on: ubuntu-24.04-arm | |
| environment: ${{ inputs.environment }} | |
| steps: | |
| - name: Check required vars | |
| run: > | |
| [ -n "${{ secrets.CACHIX_AUTH_TOKEN }}" ] && | |
| [ -n "${{ vars.CACHIX_CACHE }}" ] || | |
| { echo "Missing required vars"; exit 1; } | |
| - uses: actions/[email protected] | |
| - uses: cachix/[email protected] | |
| - uses: cachix/cachix-action@v17 | |
| with: | |
| name: ${{ vars.CACHIX_CACHE }} | |
| authToken: ${{ secrets.CACHIX_AUTH_TOKEN }} | |
| - name: Build | |
| run: nix build .#default | |
| - name: Push | |
| run: nix path-info --recursive "$(nix build .#default --print-out-paths --no-link)" | cachix push ${{ vars.CACHIX_CACHE }} |