-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ci: build and push ndc-hub:data.<commit-sha> docker image (#361)
This packages up the data in ndc-hub as a docker image. Sample build: https://github.com/hasura/ndc-hub/actions/runs/11504126541 Sample image: https://github.com/hasura/ndc-hub/pkgs/container/ndc-hub
- Loading branch information
1 parent
3197b05
commit 6334ad1
Showing
2 changed files
with
47 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,44 @@ | ||
name: DDN Assets | ||
|
||
on: | ||
push: | ||
branches: | ||
- "main" | ||
|
||
jobs: | ||
generate: | ||
runs-on: ubuntu-latest | ||
permissions: | ||
contents: read | ||
packages: write | ||
attestations: write | ||
id-token: write | ||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v4 | ||
|
||
- name: Log in to the Container registry | ||
uses: docker/login-action@65b78e6e13532edd9afa3aa52ac7964289d1a9c1 | ||
with: | ||
registry: ghcr.io | ||
username: ${{ github.actor }} | ||
password: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- name: Generate data and push image | ||
run: | | ||
export NDC_HUB_GIT_REPO_FILE_PATH=$PWD | ||
echo "NDC_HUB_GIT_REPO_FILE_PATH = $NDC_HUB_GIT_REPO_FILE_PATH" | ||
pushd docker/data | ||
echo "Downloading ddn-assets" | ||
wget https://github.com/hasura/ddn-assets/releases/download/v0.1.0/ddn-assets | ||
chmod +x ddn-assets | ||
# TODO: get rid of this after fixing https://github.com/hasura/ddn-assets/issues/7 | ||
mkdir assets | ||
echo "Running ddn-assets" | ||
./ddn-assets generate | ||
docker build -t ghcr.io/hasura/ndc-hub:data.$GITHUB_SHA . --push | ||
popd |
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 @@ | ||
FROM scratch | ||
|
||
COPY assets /assets |