Skip to content

Merge pull request #153 from subquery/update/workflow #178

Merge pull request #153 from subquery/update/workflow

Merge pull request #153 from subquery/update/workflow #178

Workflow file for this run

name: 'Prerelease'
on:
push:
branches:
- main
paths-ignore:
- '.github/workflows/**'
jobs:
Bump-Prerelease-Publish:
name: Bump-Prerelease-Publish
if: "!startsWith(github.event.head_commit.message, '[SKIP CI]') && !startsWith(github.event.head_commit.message, '[release]')"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 100
token: ${{ secrets.REPO_TOKEN }}
- name: Set up QEMU
uses: docker/setup-qemu-action@v1
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
- name: Login to DockerHub
uses: docker/login-action@v1
with:
username: subquerynetwork
password: ${{ secrets.SQ_DOCKERHUB_TOKEN }}
# build admin
- name: Setup Node.js environment
uses: actions/setup-node@v2
with:
node-version: 16
- run: npm install -g @microsoft/rush
- run: rush update
- run: rush build -o indexer-admin
- name: Setup Node.js environment
uses: actions/setup-node@v2
with:
node-version: 18
- uses: marceloprado/has-changed-path@v1
id: changed-coordinator
with:
paths: ./apps
# Add remove-stable-version
- name: Bump coordinator
if: steps.changed-coordinator.outputs.changed == 'true'
uses: ./.github/actions/create-prerelease
with:
package-path: ./apps/indexer-coordinator/
npm-token: ${{ secrets.NPM_TOKEN }}
## node
- name: Get updated coordinator version
if: steps.changed-coordinator.outputs.changed == 'true'
id: get-coordinator-version
run: |
sh .github/workflows/scripts/coordinatorVersion.sh
- name: Build and push
if: steps.changed-coordinator.outputs.changed == 'true'
uses: docker/build-push-action@v2
with:
context: .
push: true
platforms: amd64
file: ./Dockerfile
tags: subquerynetwork/indexer-coordinator-dev:v${{ steps.get-coordinator-version.outputs.COORDINATOR_VERSION }}
build-args: RELEASE_VERSION=${{ steps.get-coordinator-version.outputs.COORDINATOR_VERSION }}
- name: Image digest
if: steps.changed-coordinator.outputs.changed == 'true'
run: echo ${{ steps.docker_build.outputs.digest }}
- name: Commit changes
uses: EndBug/add-and-commit@v5
with:
message: '[SKIP CI] Prerelease'
env:
GITHUB_TOKEN: ${{ secrets.REPO_TOKEN }}