Skip to content

A little bit of simplification for Cargo. (#317) #1

A little bit of simplification for Cargo. (#317)

A little bit of simplification for Cargo. (#317) #1

Workflow file for this run

name: Postgres NDC build and push binaries with Nix
on:
push:
branches:
- main
tags:
- "v*"
jobs:
build_and_deploy:
name: build and deploy
runs-on: ubuntu-latest
strategy:
matrix:
connectors:
[
{
"build_command": "ndc-postgres-x86_64-linux",
"binary_artifact_name": "hasura-postgres-agent-rs",
"artifact_path": "result/bin/ndc-postgres",
},
{
"build_command": "ndc-cockroach-x86_64-linux",
"binary_artifact_name": "hasura-cockroach-agent-rs",
"artifact_path": "result/bin/ndc-cockroach",
},
{
"build_command": "ndc-citus-x86_64-linux",
"binary_artifact_name": "hasura-citus-agent-rs",
"artifact_path": "result/bin/ndc-citus",
},
]
steps:
- name: Checkout πŸ›ŽοΈ
uses: actions/checkout@v4
- name: Install Nix ❄
uses: DeterminateSystems/nix-installer-action@v4
- name: Run the Magic Nix Cache πŸ”Œ
uses: DeterminateSystems/magic-nix-cache-action@v2
- name: Login to GitHub Container Registry πŸ“¦
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: build the crate using nix πŸ”¨
run: nix build .#${{ matrix.connectors.build_command}} --print-build-logs
- name: Create release πŸš€
uses: actions/upload-artifact@v3
with:
name: ${{ matrix.connectors.binary_artifact_name }}
path: ${{ matrix.connectors.artifact_path }}
# scream into Slack if something goes wrong
- name: Report Status
if: always()
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 }}