Skip to content

v0.0.6

v0.0.6 #14

Workflow file for this run

name: Test and Publish Docker Image
on:
push:
paths-ignore:
- "*.md"
jobs:
test:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Set up Node.js
uses: actions/setup-node@v4
with:
cache: npm
node-version: '20'
- name: Install dependencies
run: npm ci
- name: Run tests
run: npm test
build:
runs-on: ubuntu-latest
needs: test
steps:
- name: Checkout code
uses: actions/checkout@v5
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Login to DockerHub
if: startsWith(github.ref, 'refs/tags/v')
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Build and optionally push image
uses: docker/build-push-action@v6
with:
context: .
push: ${{ startsWith(github.ref, 'refs/tags/v') }}
tags: |
universityofwarwick/image-resizer:${{ github.ref_name }}
universityofwarwick/image-resizer:latest