Merge pull request #61 from hasura/dependabot/cargo/serde-1.0.192 #101
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: | |
merge_group: | |
jobs: | |
build_and_deploy: | |
name: build and deploy | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
connector: | |
- ndc-sqlserver | |
fail-fast: false | |
permissions: | |
contents: read | |
id-token: write | |
packages: write | |
steps: | |
- name: Checkout ποΈ | |
uses: actions/checkout@v4 | |
- name: Install Nix β | |
uses: cachix/install-nix-action@v23 | |
with: | |
github_access_token: ${{ secrets.GITHUB_TOKEN }} | |
- name: Set up the Nix Cache π | |
uses: cachix/cachix-action@v12 | |
with: | |
name: hasura-v3-dev | |
authToken: ${{ secrets.CACHIX_AUTH_TOKEN }} | |
# skip until GCP credentials sorted | |
- id: gcloud-auth | |
if: false | |
name: Authenticate to Google Cloud π | |
uses: google-github-actions/auth@v1 | |
with: | |
token_format: access_token | |
service_account: "[email protected]" | |
workload_identity_provider: "projects/1025009031284/locations/global/workloadIdentityPools/hasura-ddn/providers/github" | |
# skip until GCP credentials sorted | |
- name: Login to Google Container Registry π¦ | |
if: false | |
uses: "docker/login-action@v3" | |
with: | |
registry: "us-docker.pkg.dev" | |
username: "oauth2accesstoken" | |
password: "${{ steps.gcloud-auth.outputs.access_token }}" | |
- name: Login to GitHub Container Registry π¦ | |
uses: docker/login-action@v3 | |
with: | |
registry: ghcr.io | |
username: ${{ github.actor }} | |
password: ${{ secrets.GITHUB_TOKEN }} | |
# skip until GCP credentials sorted | |
- name: Build and deploy Docker images to Google Container Registry π | |
if: false | |
run: nix run .#publish-docker-image '${{ github.ref }}' '${{ matrix.connector }}' 'us-docker.pkg.dev/hasura-ddn/ddn/${{ matrix.connector }}' | |
- name: Build and deploy Docker images to GitHub Packages π | |
run: nix run .#publish-docker-image '${{ github.ref }}' '${{ matrix.connector }}' 'ghcr.io/hasura/${{ 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 }} |