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

54 lines
1.3 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
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
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
2021-08-10 04:58:26 +02:00
uses: actions/checkout@v2
2021-08-10 05:32:03 +02:00
-
name: Set up QEMU
uses: docker/setup-qemu-action@v1
-
name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
-
2021-08-10 05:36:44 +02:00
name: Login to GitHub Container Registry
uses: docker/login-action@v1
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 }}
password: ${{ secrets.GITHUB_TOKEN }}
2021-08-10 05:32:03 +02:00
-
name: Build and push
uses: docker/build-push-action@v2
with:
context: .
file: ./Dockerfile
2021-08-10 05:48:34 +02:00
platforms: linux/amd64,linux/arm64
2021-08-10 05:32:03 +02:00
push: true
2021-08-10 05:55:17 +02:00
tags: ghcr.io/techno-tim/littlelink-server:latest