Skip to content

revert test

revert test #33

Workflow file for this run

name: test & build
on:
push:
branches: [master, dev]
workflow_dispatch: ~
jobs:
test:
name: 'Node.js v${{ matrix.node }}'
runs-on: ubuntu-latest
strategy:
matrix:
node:
- 14
- 16
- 18
steps:
- uses: actions/setup-node@v1
with:
node-version: '${{ matrix.node }}'
- uses: actions/checkout@v2
- name: 'Cache node_modules'
uses: actions/cache@v2
with:
path: ~/.npm
key: ${{ runner.os }}-node-v${{ matrix.node }}-${{ hashFiles('**/package.json') }}
restore-keys: |
${{ runner.os }}-node-v${{ matrix.node }}-
- name: Install Dependencies
run: npm install
- name: Run All Node.js Tests
run: npm run test
- name: Create Badge
run: npm run coverage:badge
dockerhub:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: get branch
run: |
# https://docs.github.com/en/actions/using-workflows/workflow-commands-for-github-actions#setting-an-environment-variable
TAG=${GITHUB_REF##*/}
if [ "$TAG" == "master" ] ; then TAG=latest ; fi
echo "TAG=$TAG" >> $GITHUB_ENV
- name: docker build
run: docker build -t nondef/thumbnailfetcher:$TAG --label "buildUrl=$GITHUB_SERVER_URL/$GITHUB_REPOSITORY/actions/runs/$GITHUB_RUN_ID" .
- uses: docker/login-action@v1
with:
username: nondef
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: docker push
run: docker push nondef/thumbnailfetcher:$TAG