Skip to content

fix(build): πŸ› resolve type errors blocking production build (#407) #70

fix(build): πŸ› resolve type errors blocking production build (#407)

fix(build): πŸ› resolve type errors blocking production build (#407) #70

Workflow file for this run

name: Build and Deploy Production
on:
push:
tags:
- 'v*.*.*'
jobs:
build-and-push-image:
runs-on: aelfscan-runner
permissions:
contents: read
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Create image tag
id: meta
uses: docker/metadata-action@v5
with:
images: ${{ secrets.REPOSITORY_REGION }}-docker.pkg.dev/${{ secrets.PROJECT_ID }}/${{ secrets.REPOSITORY }}/aelf-block-explorer
tags: |
type=ref,event=tag
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Build and push
uses: docker/build-push-action@v5
with:
context: .
push: true
platforms: linux/amd64
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
cache-from: type=gha
cache-to: type=gha,mode=max
dispatch:
runs-on: aelfscan-runner
needs: build-and-push-image
steps:
- name: Deploy
uses: actions/github-script@v6
with:
github-token: ${{ secrets.TOK }}
script: |
await github.rest.actions.createWorkflowDispatch({
owner: 'AelfScanProject',
repo: 'devops',
workflow_id: 'aelf-explorer-server-deploy.yaml',
ref: 'main',
inputs: {
env: 'production',
appName: 'aelf-explorer-web',
commit_sha: '${{ github.ref_name }}',
}
})