Skip to content

Commit

Permalink
🛋️
Browse files Browse the repository at this point in the history
  • Loading branch information
Jennings Zhang authored and Jennings Zhang committed Jul 24, 2024
0 parents commit 5097126
Show file tree
Hide file tree
Showing 4 changed files with 69 additions and 0 deletions.
3 changes: 3 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
*
.*

53 changes: 53 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
name: Build

on:
push:
tags:
- 'v[0-9]+.[0-9]+.[0-9]+*'
paths:
- 'Dockerfile'
- '.github/**'

jobs:
build:
runs-on: ubuntu-24.04
steps:
- uses: docker/setup-qemu-action@v3
- uses: docker/setup-buildx-action@v3
- name: Login to DockerHub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_PASSWORD }}
- name: Login to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Parse version from tag
id: parse
run: echo "VERSION=${GITHUB_REF_NAME:1}" >> "$GITHUB_OUTPUT" # removes the 'v' prefix
- name: Build and push
uses: docker/build-push-action@v6
with:
tags: |
docker.io/fnndsc/hasura-cli:${{ steps.parse.outputs.VERSION }}
docker.io/fnndsc/hasura-cli:latest
ghcr.io/fnndsc/hasura-cli:${{ steps.parse.outputs.VERSION }}
ghcr.io/fnndsc/hasura-cli:latest
platforms: linux/amd64,linux/arm64
build-args: VERSION=${{ github.ref_name }}
push: true

dockerhub-description:
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v4
- name: Update DockerHub description
uses: peter-evans/dockerhub-description@v4
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_PASSWORD }}
short-description: Hasura CLI
readme-filepath: ./README
9 changes: 9 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# syntax=docker/dockerfile:1
FROM docker.io/library/debian:bookworm-slim

RUN apt-get update && apt-get -y --no-install-recommends install curl

ARG VERSION=v2.40.0
RUN curl -L https://github.com/hasura/graphql-engine/raw/stable/cli/get.sh | bash

CMD ["hasura", "metadata", "apply"]
4 changes: 4 additions & 0 deletions README
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Unofficial container image for hasura-cli.

Upstream: https://hasura.io/docs/latest/hasura-cli/install-hasura-cli/
Source: https://github.com/FNNDSC/hasura-cli

0 comments on commit 5097126

Please sign in to comment.