mirror of
https://github.com/techno-tim/littlelink-server.git
synced 2024-12-01 06:53:25 +01:00
64 lines
2.0 KiB
YAML
64 lines
2.0 KiB
YAML
name: CI for releases
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- master
|
|
|
|
jobs:
|
|
js-install-and-test:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # 4.1.1
|
|
|
|
- name: Use Node.js
|
|
uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8 # 4.0.1
|
|
with:
|
|
node-version: v20.10.0
|
|
- 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@b4ffde65f46336ab88eb53be808477a3936bae11 # 4.1.1
|
|
|
|
-
|
|
name: Set up QEMU
|
|
uses: docker/setup-qemu-action@68827325e0b33c7199eb31dd4e31fbe9023e06e3 # 3.0.0
|
|
-
|
|
name: Set up Docker Buildx
|
|
uses: docker/setup-buildx-action@f95db51fddba0c2d1ec667646a06c2ce06100226 # 3.0.0
|
|
|
|
-
|
|
name: Login to GitHub Container Registry
|
|
uses: docker/login-action@343f7c4344506bcbf9b4de18042ae17996df046d # 3.0.0
|
|
with:
|
|
registry: ghcr.io
|
|
username: ${{ github.repository_owner }}
|
|
password: ${{ secrets.PAT }}
|
|
-
|
|
name: Login to DockerHub
|
|
uses: docker/login-action@343f7c4344506bcbf9b4de18042ae17996df046d # 3.0.0
|
|
with:
|
|
username: ${{ secrets.DOCKERHUB_USERNAME }}
|
|
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
|
-
|
|
name: Build and push
|
|
uses: docker/build-push-action@4a13e500e55cf31b7a5d59a38ab2040ab0f42f56 # 5.1.0
|
|
with:
|
|
context: .
|
|
file: ./Dockerfile
|
|
platforms: linux/amd64,linux/arm64 # have to disable linux/arm/v7 linux/arm/v6 for now, see https://github.com/nodejs/docker-node/issues/1798
|
|
push: true
|
|
tags: |
|
|
ghcr.io/techno-tim/littlelink-server:latest
|
|
timothystewart6/littlelink-server
|