A little bit of simplification for Cargo. (#317) #1
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: multi-architecture docker build | |
on: | |
push: | |
branches: | |
- main | |
tags: | |
- "v*" | |
jobs: | |
build_and_deploy: | |
name: build and deploy | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
connector: | |
- ndc-citus | |
- ndc-cockroach | |
- ndc-postgres | |
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 and deploy docker images π | |
run: nix run .#publish-docker-image ${{ github.ref }} ${{ matrix.connector }} | |
# 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 }} |