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

62 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:
node-version: v18.12.1
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:
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
tags: |
ghcr.io/techno-tim/littlelink-server:latest
timothystewart6/littlelink-server