# This workflow will do a clean install of node dependencies, build the source code and run tests across different versions of node # For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions name: Frontend CI on: push: paths: - '.github/workflows/frontend.yml' - 'frontend/**' - '!backend/**' defaults: run: working-directory: ./frontend jobs: build: runs-on: ubuntu-latest strategy: matrix: node-version: [10.x, 12.x] steps: - uses: actions/checkout@v2 - name: Use Node.js ${{ matrix.node-version }} uses: actions/setup-node@v1 with: node-version: ${{ matrix.node-version }} - name: install run: yarn install - name: check run: yarn pretty:check - name: Test run: yarn test - name: Build run: yarn build - name: Login to Dockerhub uses: docker/login-action@v1 with: username: ${{ secrets.DOCKER_USERNAME }} password: ${{ secrets.DOCKER_PASSWORD }} - name: Build and Push template image uses: docker/build-push-action@v2 # https://github.com/docker/build-push-action if: matrix.node-version == '12.x' with: context: './frontend' push: ${{ startsWith(github.ref, 'refs/tags/') }} tags: parity/substrate-telemetry-frontend:latest # add_git_labels: true