2022-02-04 21:24:11 +01:00
|
|
|
name: Docker Dev Image CI
|
|
|
|
|
|
|
|
on:
|
|
|
|
push:
|
|
|
|
branches: [ dev ]
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
test:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
# Checkout the Repo
|
2022-03-02 03:42:47 +01:00
|
|
|
- uses: actions/checkout@v3
|
2022-02-04 21:24:11 +01:00
|
|
|
|
|
|
|
# Install Node 16
|
|
|
|
- name: Setup Node
|
2022-06-07 04:23:14 +02:00
|
|
|
uses: actions/setup-node@v3.3.0
|
2022-02-04 21:24:11 +01:00
|
|
|
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
|
2022-05-08 13:32:17 +02:00
|
|
|
uses: docker/setup-qemu-action@v2
|
2022-02-04 21:24:11 +01:00
|
|
|
-
|
|
|
|
name: Set up Docker Buildx
|
2022-05-08 13:32:17 +02:00
|
|
|
uses: docker/setup-buildx-action@v2
|
2022-02-04 21:24:11 +01:00
|
|
|
-
|
|
|
|
name: Login to DockerHub
|
2022-05-08 13:32:17 +02:00
|
|
|
uses: docker/login-action@v2
|
2022-02-04 21:24:11 +01:00
|
|
|
with:
|
|
|
|
username: ${{ secrets.DOCKER_HUB_USERNAME }}
|
|
|
|
password: ${{ secrets.DOCKER_HUB_TOKEN }}
|
|
|
|
-
|
|
|
|
name: Build and push
|
2022-05-08 13:32:17 +02:00
|
|
|
uses: docker/build-push-action@v3
|
2022-02-04 21:24:11 +01:00
|
|
|
with:
|
|
|
|
push: true
|
|
|
|
tags: wolvan/poll.horse:dev
|