mirror of
https://github.com/Wolvan/poll.horse.git
synced 2024-11-25 14:08:01 +01:00
af8163541a
A couple of github action files have been added that (hopefully) run tests and CI for the docker images on push to dev and master.
51 lines
1.1 KiB
YAML
51 lines
1.1 KiB
YAML
name: Docker Dev Image CI
|
|
|
|
on:
|
|
push:
|
|
branches: [ dev ]
|
|
|
|
jobs:
|
|
test:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
# Checkout the Repo
|
|
- uses: actions/checkout@v2
|
|
|
|
# Install Node 16
|
|
- name: Setup Node
|
|
uses: actions/setup-node@v1
|
|
with:
|
|
node-version: 16
|
|
|
|
# Avoid running prepublish script
|
|
- run: npm set-script prepublish ""
|
|
|
|
# Install dependencies
|
|
- run: npm install
|
|
|
|
# Run tests
|
|
- run: npm test
|
|
|
|
build:
|
|
needs: test
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
-
|
|
name: Set up QEMU
|
|
uses: docker/setup-qemu-action@v1
|
|
-
|
|
name: Set up Docker Buildx
|
|
uses: docker/setup-buildx-action@v1
|
|
-
|
|
name: Login to DockerHub
|
|
uses: docker/login-action@v1
|
|
with:
|
|
username: ${{ secrets.DOCKER_HUB_USERNAME }}
|
|
password: ${{ secrets.DOCKER_HUB_TOKEN }}
|
|
-
|
|
name: Build and push
|
|
uses: docker/build-push-action@v2
|
|
with:
|
|
push: true
|
|
tags: wolvan/poll.horse:dev
|