2021-08-10 04:58:26 +02:00
|
|
|
name: CI for releases
|
|
|
|
|
|
|
|
on:
|
|
|
|
push:
|
|
|
|
branches:
|
|
|
|
- master
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
js-install-and-test:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
2024-01-10 21:08:15 +01:00
|
|
|
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # 4.1.1
|
2022-08-30 05:07:06 +02:00
|
|
|
|
2022-10-27 05:12:56 +02:00
|
|
|
- name: Use Node.js
|
2024-01-10 21:08:15 +01:00
|
|
|
uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8 # 4.0.1
|
2021-08-10 04:58:26 +02:00
|
|
|
with:
|
2024-01-10 16:54:41 +01:00
|
|
|
node-version: v20.10.0
|
2021-08-10 04:58:26 +02:00
|
|
|
- name: Install Dependencies, Test, and Build
|
|
|
|
run: |
|
2021-10-06 05:15:46 +02:00
|
|
|
yarn install --frozen-lockfile --check-files --network-timeout 600000
|
2021-10-06 04:40:51 +02:00
|
|
|
yarn ci
|
2021-08-10 04:58:26 +02:00
|
|
|
env:
|
|
|
|
CI: true
|
|
|
|
|
|
|
|
build-and-push-docker-image:
|
|
|
|
needs: [js-install-and-test]
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
2023-01-31 03:12:55 +01:00
|
|
|
-
|
2021-08-10 05:32:03 +02:00
|
|
|
name: Checkout
|
2024-01-10 21:08:15 +01:00
|
|
|
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # 4.1.1
|
2022-08-30 05:07:06 +02:00
|
|
|
|
2021-08-10 05:32:03 +02:00
|
|
|
-
|
|
|
|
name: Set up QEMU
|
2024-01-10 21:08:15 +01:00
|
|
|
uses: docker/setup-qemu-action@68827325e0b33c7199eb31dd4e31fbe9023e06e3 # 3.0.0
|
2021-08-10 05:32:03 +02:00
|
|
|
-
|
|
|
|
name: Set up Docker Buildx
|
2024-01-10 21:08:15 +01:00
|
|
|
uses: docker/setup-buildx-action@f95db51fddba0c2d1ec667646a06c2ce06100226 # 3.0.0
|
2024-01-10 21:36:05 +01:00
|
|
|
|
2021-08-10 05:32:03 +02:00
|
|
|
-
|
2021-08-10 05:36:44 +02:00
|
|
|
name: Login to GitHub Container Registry
|
2024-01-10 21:08:15 +01:00
|
|
|
uses: docker/login-action@343f7c4344506bcbf9b4de18042ae17996df046d # 3.0.0
|
2021-08-10 04:58:26 +02:00
|
|
|
with:
|
2021-08-10 05:36:44 +02:00
|
|
|
registry: ghcr.io
|
2021-08-10 05:56:52 +02:00
|
|
|
username: ${{ github.repository_owner }}
|
2021-08-10 05:58:36 +02:00
|
|
|
password: ${{ secrets.PAT }}
|
2021-08-27 02:42:16 +02:00
|
|
|
-
|
|
|
|
name: Login to DockerHub
|
2024-01-10 21:08:15 +01:00
|
|
|
uses: docker/login-action@343f7c4344506bcbf9b4de18042ae17996df046d # 3.0.0
|
2021-08-27 02:42:16 +02:00
|
|
|
with:
|
|
|
|
username: ${{ secrets.DOCKERHUB_USERNAME }}
|
|
|
|
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
2021-08-16 04:45:17 +02:00
|
|
|
-
|
|
|
|
name: Build and push
|
2024-01-10 21:08:15 +01:00
|
|
|
uses: docker/build-push-action@4a13e500e55cf31b7a5d59a38ab2040ab0f42f56 # 5.1.0
|
2021-08-16 04:45:17 +02:00
|
|
|
with:
|
|
|
|
context: .
|
|
|
|
file: ./Dockerfile
|
2024-01-10 21:47:16 +01:00
|
|
|
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
|
2021-08-16 04:45:17 +02:00
|
|
|
push: true
|
2023-01-31 03:12:55 +01:00
|
|
|
tags: |
|
2021-08-27 02:42:16 +02:00
|
|
|
ghcr.io/techno-tim/littlelink-server:latest
|
2023-01-31 03:12:55 +01:00
|
|
|
timothystewart6/littlelink-server
|