Merge pull request #1426 from SwitchbladeBot/snyk-fix-aa7e7a1a2fc6142… #2010
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: CI | |
on: [push, pull_request] | |
jobs: | |
test: | |
name: Tests | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Install Node v16 | |
uses: actions/setup-node@v2 | |
with: | |
cache: npm | |
node-version: 16 | |
- name: Install dependencies | |
run: npm ci | |
- name: Run Tests | |
run: npm run test | |
build: | |
name: Docker | |
runs-on: ubuntu-latest | |
needs: test | |
if: github.event_name == 'push' | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Build and publish to registry | |
uses: docker/build-push-action@v1 | |
with: | |
username: ${{ secrets.DOCKER_USERNAME }} | |
password: ${{ secrets.DOCKER_PASSWORD }} | |
repository: switchbladebot/switchblade-legacy | |
tag_with_ref: true |