littlelink-server/.github/workflows/main.yml
2021-10-05 22:15:46 -05:00

63 lines
1.6 KiB
YAML

name: CI for releases
on:
push:
branches:
- master
jobs:
js-install-and-test:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [v14.17.4]
steps:
- uses: actions/checkout@v2
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@master
with:
node-version: ${{ matrix.node-version }}
- name: Install Dependencies, Test, and Build
run: |
yarn install --frozen-lockfile --check-files --network-timeout 600000
yarn ci
env:
CI: true
build-and-push-docker-image:
needs: [js-install-and-test]
runs-on: ubuntu-latest
steps:
-
name: Checkout
uses: actions/checkout@v2
-
name: Set up QEMU
uses: docker/setup-qemu-action@v1
-
name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
-
name: Login to GitHub Container Registry
uses: docker/login-action@v1
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.PAT }}
-
name: Login to DockerHub
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
-
name: Build and push
uses: docker/build-push-action@v2
with:
context: .
file: ./Dockerfile
platforms: linux/amd64,linux/arm64,linux/arm/v7,linux/arm/v6
push: true
tags: |
ghcr.io/techno-tim/littlelink-server:latest
timothystewart6/littlelink-server