nix fmt requires a file path #24
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: "docker" | |
| on: | |
| workflow_dispatch: | |
| push: | |
| branches: | |
| - main | |
| jobs: | |
| docker-push: | |
| strategy: | |
| matrix: | |
| image: [spiced] | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: docker/login-action@v3 | |
| with: | |
| registry: ghcr.io | |
| username: ${{ github.actor }} | |
| password: ${{ secrets.GITHUB_TOKEN }} | |
| - uses: cachix/install-nix-action@v30 | |
| with: | |
| nix_path: nixpkgs=channel:nixos-unstable | |
| - uses: cachix/cachix-action@v14 | |
| with: | |
| name: 'cybertreiber' | |
| authToken: '${{ secrets.CACHIX_AUTH_TOKEN }}' | |
| - run: nix build .#images.${{ matrix.image }} && ./result | docker load | |
| - run: docker tag ${{ matrix.image }} ghcr.io/ahirner/${{ matrix.image }} | |
| - run: docker tag ${{ matrix.image }} ghcr.io/ahirner/${{ matrix.image }}:"${GITHUB_SHA:0:8}" | |
| - run: docker push ghcr.io/ahirner/${{ matrix.image }} -a |