Merge pull request #34 from hasura/dependabot/cargo/insta-1.34.0 #34
This file contains 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: SQLServer NDC build and deploy with Nix | |
on: | |
push: | |
branches: | |
- main | |
tags: | |
- 'v*' | |
jobs: | |
binary: | |
name: deploy::binary | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout ποΈ | |
uses: actions/checkout@v4 | |
- name: Install Nix β | |
uses: DeterminateSystems/nix-installer-action@v6 | |
- 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 --print-build-logs | |
- name: Create release π | |
uses: actions/upload-artifact@v3 | |
with: | |
name: hasura-sqlserver-agent-rs | |
path: result/bin/ndc-sqlserver | |
# 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 }} | |
docker: | |
name: deploy::docker | |
needs: binary | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout ποΈ | |
uses: actions/checkout@v4 | |
- name: Install Nix β | |
uses: DeterminateSystems/nix-installer-action@v6 | |
- 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: Deploy π | |
run: nix run .#publish-docker-image ${{ github.ref }} | |
# 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 }} |