Add support for safe/finalized blocks and support latest subquery image #12
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
# Generated by @zondax/cli | |
name: Publish SubQuery Indexer | |
on: | |
push: | |
branches: | |
- main | |
- master | |
- dev | |
pull_request: | |
branches: ["*"] | |
release: | |
types: | |
- created | |
tags: | |
- "v[0-9]+" | |
- "v[0-9]+.[0-9]+" | |
- "v[0-9]+.[0-9]+.[0-9]+" | |
jobs: | |
build: | |
runs-on: zondax-runners | |
steps: | |
- name: Install deps | |
run: | | |
sudo apt-get update -y | |
sudo apt-get install -yy git make curl | |
- name: Checkout | |
uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 # get everything | |
- name: Put back the git branch into git (Earthly uses it for tagging) | |
run: | | |
git config --global --add safe.directory "*" | |
branch="" | |
if [ -n "$GITHUB_HEAD_REF" ]; then | |
branch="$GITHUB_HEAD_REF" | |
else | |
branch="${GITHUB_REF##*/}" | |
fi | |
git checkout -b "$branch" || true | |
- uses: earthly/actions-setup@v1 | |
with: | |
version: v0.7.21 | |
- name: Login to Docker Hub | |
uses: docker/login-action@v2 | |
with: | |
username: ${{ secrets.DOCKERHUB_USER }} | |
password: ${{ secrets.DOCKERHUB_TOKEN }} | |
- name: Earthly bootstrap and configure | |
run: | | |
earthly config global.disable_analytics true | |
earthly config global.tls_enabled false | |
earthly --version | |
earthly bootstrap | |
- name: Run build (PR) | |
if: ${{ github.event_name == 'pull_request' }} | |
env: | |
EARTHLY_PUSH: False | |
run: earthly --ci +all | |
working-directory: ./subq-indexer | |
- name: Run build (branch) and publish | |
if: ${{ github.event_name != 'pull_request' }} | |
run: earthly --ci --push +all | |
working-directory: ./subq-indexer |