Skip to content
This repository has been archived by the owner on Dec 5, 2023. It is now read-only.

Merge pull request #173 from enekofb/master #47

Merge pull request #173 from enekofb/master

Merge pull request #173 from enekofb/master #47

Workflow file for this run

name: ci
on:
push:
branches:
- "*" # run for branches
tags:
- "*" # run for tags
pull_request:
branches:
- "*" # run for branches
tags:
- "*" # run for tags
jobs:
test:
runs-on: ubuntu-latest
env:
GROUP: weaveworksdemos
COMMIT: ${{ github.sha }}
REPO: front-end
steps:
- uses: actions/checkout@v2
#
#
# Set up node
- uses: actions/setup-node@v1
with:
node-version: '4.x'
#
#
# Install dependencies
- run: npm install
#
#
# Run node tests in docker image
- name: Test image
env:
DOCKER_BUILDKIT: 1
run: make test
#
#
# Build docker image for service
- name: Build docker image
uses: docker/build-push-action@v1
with:
push: false
repository: ${{ env.GROUP }}/${{ env.REPO }}
tag_with_ref: true
tag_with_sha: true
tags: ${{ github.sha }}
#
#
# Run simple test against built container
- name: Test docker image
env:
DOCKER_BUILDKIT: 1
run: ./test/container.sh
#
#
# Push to dockerhub
- name: Push to Docker Hub
uses: docker/build-push-action@v1
if: startsWith(github.ref, 'refs/tags/v') || github.ref == 'refs/heads/master'
with:
username: ${{ secrets.DOCKER_USER }}
password: ${{ secrets.DOCKER_PASS }}
repository: ${{ env.GROUP }}/${{ env.REPO }}
tag_with_ref: true
tag_with_sha: true