Skip to content

refactor: Add new GH workflow for Hasura #5

refactor: Add new GH workflow for Hasura

refactor: Add new GH workflow for Hasura #5

Workflow file for this run

name: Hasura
on:
pull_request:
paths:
- .github/workflows/hasura.yml
- src/hasura/**
push:
branches: [main]
paths:
- .github/workflows/hasura.yml
- src/hasura/**
jobs:
docker:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up QEMU
uses: docker/setup-qemu-action@v2
with:
platforms: arm,arm64
- name: Set up buildx
uses: docker/setup-buildx-action@v2
- name: Login to GitHub Container Registry
if: github.event_name == 'push'
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and push
uses: docker/build-push-action@v4
with:
context: ./src/hasura
file: ./src/hasura/Dockerfile
push: ${{ github.event_name == 'push' }}
tags: |
ghcr.io/${{ github.repository_owner }}/microservices-example/hasura:build-${{ github.run_number }}
ghcr.io/${{ github.repository_owner }}/microservices-example/hasura:latest
cache-from: type=gha
cache-to: type=gha,mode=max