summaryrefslogtreecommitdiff
path: root/.github/workflows/ci.yaml
diff options
context:
space:
mode:
authorseth <[email protected]>2023-12-16 00:34:10 -0500
committerseth <[email protected]>2023-12-16 11:29:01 -0500
commit51c97f77ae11d4eb8e5c38a9f5d0b5ca9d8e3da4 (patch)
tree7a7e32f0ff01549252fb205886c602f919c8b211 /.github/workflows/ci.yaml
parentbd2966db8f3660c03039a0f6ab03e850f0e17d45 (diff)
ci: back to garnix
Diffstat (limited to '.github/workflows/ci.yaml')
-rw-r--r--.github/workflows/ci.yaml113
1 files changed, 0 insertions, 113 deletions
diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml
deleted file mode 100644
index 98e3af4..0000000
--- a/.github/workflows/ci.yaml
+++ /dev/null
@@ -1,113 +0,0 @@
-name: CI
-
-on:
- push:
- branches: [main]
- pull_request:
- workflow_dispatch:
-
-jobs:
- eval:
- name: Evaluate flake
- runs-on: ubuntu-latest
-
- outputs:
- matrix: ${{ steps.evaluate.outputs.matrix }}
-
- steps:
- - uses: actions/checkout@v4
-
- - name: Install Nix
- uses: DeterminateSystems/nix-installer-action@v9
-
- - name: Evaluate matrix
- id: evaluate
- run: |
- set -eu
- echo "matrix=$(nix eval --show-trace --json .#githubWorkflow.matrix)" >> "$GITHUB_OUTPUT"
-
- build:
- needs: eval
-
- strategy:
- fail-fast: false
- matrix: ${{ fromJSON(needs.eval.outputs.matrix) }}
-
- name: Build (${{ matrix.attr }})
- runs-on: ${{ matrix.os }}
-
- steps:
- - uses: actions/checkout@v4
-
- - name: Install Nix
- uses: DeterminateSystems/nix-installer-action@v9
-
- - name: Setup local Nix cache
- uses: DeterminateSystems/magic-nix-cache-action@v2
-
- - name: Setup Attic cache
- uses: ryanccn/attic-action@v0
- with:
- endpoint: https://cache.mydadleft.me
- cache: teawiebot
- token: ${{ secrets.ATTIC_TOKEN }}
- skip-push: ${{ github.event_name == 'pull_request' }}
-
- - name: Run build
- run: |
- nix build -L --accept-flake-config .#${{ matrix.attr }}
-
- check:
- name: Check flake
- runs-on: ubuntu-latest
-
- steps:
- - uses: actions/checkout@v4
-
- - name: Install Nix
- uses: DeterminateSystems/nix-installer-action@v9
-
- - name: Setup local Nix cache
- uses: DeterminateSystems/magic-nix-cache-action@v2
-
- - name: Setup Attic cache
- uses: ryanccn/attic-action@v0
- with:
- endpoint: https://cache.mydadleft.me
- cache: teawiebot
- token: ${{ secrets.ATTIC_TOKEN }}
- skip-push: ${{ github.event_name == 'pull_request' }}
-
- - name: Run check
- run: nix flake check --show-trace --accept-flake-config
-
- # https://github.com/orgs/community/discussions/26822#discussioncomment-3305794
- gate:
- needs: [build, check]
-
- name: CI Gate
- runs-on: ubuntu-latest
-
- if: always()
-
- steps:
- - name: Exit with result
- run: |
- build_result="${{ needs.build.result }}"
- check_result="${{ needs.check.result }}"
-
- results=("$build_result" "$check_result")
-
- for result in "${results[@]}"; do [ "$result" != "success" ] && exit 1; done
-
- exit 0
-
- docker:
- needs: gate
-
- permissions:
- packages: write
-
- name: Push to image registry
- if: github.event_name == 'push' || github.event_name == 'workflow_dispatch'
- uses: ./.github/workflows/docker.yaml