-
Notifications
You must be signed in to change notification settings - Fork 1
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
Showing
13 changed files
with
637 additions
and
232 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 |
---|---|---|
@@ -1,10 +1,6 @@ | ||
name: docker | ||
on: | ||
workflow_dispatch: # manually run | ||
inputs: | ||
tag: | ||
description: image tag | ||
required: true | ||
|
||
env: | ||
CI: true | ||
|
@@ -20,32 +16,29 @@ jobs: | |
- name: Set up Docker Buildx | ||
uses: docker/setup-buildx-action@v3 | ||
|
||
- uses: SebRollen/[email protected] | ||
id: read_toml | ||
with: | ||
file: 'Cargo.toml' | ||
field: 'package.version' | ||
|
||
- name: Docker login | ||
uses: docker/login-action@v3 | ||
with: | ||
username: ${{ secrets.DOCKER_LOGIN }} | ||
password: ${{ secrets.DOCKER_TOKEN }} | ||
|
||
- name: Build query gateway | ||
uses: docker/build-push-action@v5 | ||
with: | ||
context: . | ||
load: true | ||
tags: subsquid/query-gateway:test | ||
cache-from: type=gha | ||
cache-to: type=gha,mode=max | ||
|
||
- name: Get query gateway version | ||
run: echo "GATEWAY_VERSION=$(docker run --rm subsquid/query-gateway:test subsquid-query-gateway --version | cut -d ' ' -f2)" >> $GITHUB_ENV | ||
|
||
- name: Build & publish query gateway | ||
uses: docker/build-push-action@v5 | ||
env: | ||
VERSION: ${{ steps.read_toml.outputs.value }} | ||
with: | ||
context: . | ||
platforms: linux/amd64,linux/arm/v7,linux/arm64/v8,linux/386 | ||
# Build only for Linux AMD64 now, uncomment and re-build before public release | ||
platforms: linux/amd64 | ||
# platforms: linux/amd64,linux/arm/v7,linux/arm64/v8,linux/386 | ||
push: true | ||
tags: | | ||
subsquid/query-gateway:${{ env.GATEWAY_VERSION }} | ||
subsquid/query-gateway:${{ inputs.tag }} | ||
subsquid/sqd-portal:${{ env.VERSION }} | ||
cache-from: type=gha | ||
cache-to: type=gha,mode=max |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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
Oops, something went wrong.