littlelink-server/.github/workflows/main.yml

63 lines
1.9 KiB
YAML
Raw Normal View History

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:
2022-08-30 05:07:06 +02:00
- uses: actions/checkout@2541b1294d2704b0964813337f33b291d3f8596b # 3.0.2
- name: Use Node.js
2022-08-30 05:07:06 +02:00
uses: actions/setup-node@2fddd8803e2f5c9604345a0b591c3020ee971a93
2021-08-10 04:58:26 +02:00
with:
2023-04-15 20:27:15 +02:00
node-version: v18.16.0
2021-08-10 04:58:26 +02:00
- name: Install Dependencies, Test, and Build
run: |
yarn install --frozen-lockfile --check-files --network-timeout 600000
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
2022-08-30 05:07:06 +02:00
uses: actions/checkout@2541b1294d2704b0964813337f33b291d3f8596b # 3.0.2
2021-08-10 05:32:03 +02:00
-
name: Set up QEMU
2022-08-30 05:07:06 +02:00
uses: docker/setup-qemu-action@8b122486cedac8393e77aa9734c3528886e4a1a8 # 2.0.0
2021-08-10 05:32:03 +02:00
-
name: Set up Docker Buildx
2022-08-30 05:07:06 +02:00
uses: docker/setup-buildx-action@dc7b9719a96d48369863986a06765841d7ea23f6 # 2.0.0
2021-08-10 05:32:03 +02:00
-
2021-08-10 05:36:44 +02:00
name: Login to GitHub Container Registry
2022-08-30 05:07:06 +02:00
uses: docker/login-action@49ed152c8eca782a232dede0303416e8f356c37b # 2.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 }}
-
name: Login to DockerHub
2022-08-30 05:07:06 +02:00
uses: docker/login-action@49ed152c8eca782a232dede0303416e8f356c37b # 2.0.0
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
2021-08-16 04:45:17 +02:00
-
name: Build and push
2022-08-30 05:07:06 +02:00
uses: docker/build-push-action@c84f38281176d4c9cdb1626ffafcd6b3911b5d94 # 3.1.1
2021-08-16 04:45:17 +02:00
with:
context: .
file: ./Dockerfile
platforms: linux/amd64,linux/arm64,linux/arm/v7,linux/arm/v6
push: true
2023-01-31 03:12:55 +01:00
tags: |
ghcr.io/techno-tim/littlelink-server:latest
2023-01-31 03:12:55 +01:00
timothystewart6/littlelink-server