watcher-ts/.github/workflows/on-main.yaml
nikugogoi 1c15c1eedb Test case for EdenNetwork event handler (#31)
* Test case for calling EdenNetwork event handler

* Test cases for calling EdenNetwork event handlers

* Test cases for calling event handlers in EdenNetworkDistribution

* Test cases for calling event handlers in EdenNetworkGovernance

* Perform eth-calls according to contract name in param

* Pass function params in eth-call host API

* Return value from eth-call to wasm

* Add instructions for running tests

* Install assemblyscript from github packages

* Add instrcutions for installing private github packages

* Use vulcanize assemblyscript package
2021-12-28 16:08:05 +05:30

44 lines
1.4 KiB
YAML

name: Docker Compose Build
on:
push:
branches:
- main
jobs:
test:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [16.x]
steps:
- uses: actions/checkout@v2
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}
- run: yarn
# https://github.com/actions/setup-node/blob/main/docs/advanced-usage.md#use-private-packages
env:
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Linter check
run: yarn lint
build:
name: Run docker build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Get the version
id: vars
run: |
echo ::set-output name=sha::$(echo ${GITHUB_SHA:0:7})
echo ::set-output name=repo::$(echo ${{ github.repository }})
- name: Run docker build
run: docker build -t ${{steps.vars.outputs.repo}} .
- name: Tag docker image
run: docker tag ${{steps.vars.outputs.repo}} ghcr.io/${{steps.vars.outputs.repo}}:${{steps.vars.outputs.sha}}
- name: Docker Login
run: echo ${{ secrets.GITHUB_TOKEN }} | docker login ghcr.io -u vulcanize --password-stdin
- name: Docker Push
run: docker push ghcr.io/${{steps.vars.outputs.repo}}:${{steps.vars.outputs.sha}}