Skip to content

Commit

Permalink
add nix-build step
Browse files Browse the repository at this point in the history
  • Loading branch information
codingkarthik committed Jan 22, 2025
1 parent 196330a commit 49c74fb
Showing 1 changed file with 42 additions and 0 deletions.
42 changes: 42 additions & 0 deletions .github/workflows/test-cli-plugin-manifest.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,48 @@ env:
BINARY_NAME: your_cli_name

jobs:
nix-build:
name: nix build
runs-on: ubuntu-latest
strategy:
matrix:
target:
- x86_64-linux
- aarch64-linux
steps:
- name: Checkout 🛎️
uses: actions/checkout@v4

- name: Install Nix ❄
uses: cachix/install-nix-action@v30
with:
github_access_token: ${{ secrets.GITHUB_TOKEN }}

- name: Set up the Nix Cache 🔌
uses: cachix/cachix-action@v15
with:
name: hasura-v3-dev
authToken: ${{ secrets.CACHIX_AUTH_TOKEN }}
useDaemon: false # attempt to stop hanging on cleanup

- name: Build a binary with Nix
run: nix build --print-build-logs '.#${{ matrix.target }}'

- name: Build a Docker image with Nix
run: nix build --print-build-logs '.#docker-${{ matrix.target }}'

# scream into Slack if something goes wrong
- name: Report Status
if: always() && github.ref == 'refs/heads/main'
uses: ravsamhq/notify-slack-action@v2
with:
status: ${{ job.status }}
notify_when: failure
notification_title: "😧 Error on <{repo_url}|{repo}>"
message_format: "🐴 *{workflow}* {status_message} for <{repo_url}|{repo}>"
env:
SLACK_WEBHOOK_URL: ${{ secrets.BROKEN_BUILD_SLACK_WEBHOOK_URL }}

build:
name: Build the CLI binaries
strategy:
Expand Down

0 comments on commit 49c74fb

Please sign in to comment.