Merge pull request #88 from availproject/ghali/fix-upstream #59
Workflow file for this run
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
name: Releaser | |
on: | |
push: | |
branches-ignore: | |
- '**' | |
tags: | |
- '*' | |
jobs: | |
build_explorer: | |
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 |