-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Jennings Zhang
authored and
Jennings Zhang
committed
Jul 24, 2024
0 parents
commit 64cf21d
Showing
4 changed files
with
69 additions
and
0 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
* | ||
.* | ||
|
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
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 |
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
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"] |
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
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 |