Skip to content

deploy to prod

deploy to prod #66

Workflow file for this run

name: Releaser
on:
push:
branches:
- '**'
tags:
- '*'
jobs:
build_explorer:
if: false
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: build avail explorer via yarn
shell: bash
run: |
yarn install
yarn run build:www
pushd /home/runner/work/avail-apps/avail-apps/packages/apps/
tar czf avail-explorer.tar.gz build/
popd
- uses: actions/upload-artifact@v2
with:
name: avail-explorer
path: /home/runner/work/avail-apps/avail-apps/packages/apps/avail-explorer.tar.gz
# build image and publish to dockerhub
docker_build_push:
needs: [build_explorer]
runs-on: ubuntu-20.04
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up QEMU
uses: docker/setup-qemu-action@v2
- name: Set up Docker Buildx
id: buildx
uses: docker/setup-buildx-action@v2
- name: Prepare
id: prepare
run: |
TAG=${GITHUB_REF#refs/tags/}
echo ::set-output name=tag_name::${TAG}
- name: Login to DockerHub
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Build and push images
uses: docker/build-push-action@v3
with:
builder: ${{ steps.buildx.outputs.name }}
context: .
file: ./docker/Dockerfile
platforms: linux/amd64
push: true
tags: availj/explorer:${{ steps.prepare.outputs.tag_name }}
build-args: |
TURING_URL=wss://turing-rpc.avail.so/ws
MAINNET_URL=wss://mainnet-rpc.avail.so/ws
k8s_deployment:
# needs: [build_explorer]
runs-on: ubuntu-20.04
environment: prod
steps:
- name: Set up Kubectl
uses: azure/setup-kubectl@v1
with:
version: 'v1.29.2'
- name: Configure Kubernetes Context
uses: azure/k8s-set-context@v1
with:
kubeconfig: ${{ secrets.KUBECONFIG }}
- name: Deploy to Kubernetes
run: |
kubectl -v=7 set image deployment/explorer explorer=availj/explorer:v1.12