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

69 lines
1.8 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 }}
2021-08-10 05:58:36 +02:00
password: ${{ secrets.PAT }}
2021-08-10 05:32:03 +02:00
-
name: Build and push
uses: docker/build-push-action@v2
with:
context: .
file: ./Dockerfile
2021-08-14 21:12:09 +02:00
platforms: linux/amd64,linux/arm64,linux/arm/v7,linux/arm/v6
2021-08-10 05:32:03 +02:00
push: true
2021-08-16 04:45:17 +02:00
tags: ghcr.io/techno-tim/littlelink-server:latest
-
name: Login to DockerHub
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
-
name: Build and push
uses: docker/build-push-action@v2
with:
context: .
file: ./Dockerfile
platforms: linux/amd64,linux/arm64,linux/arm/v7,linux/arm/v6
push: true
tags: timothystewart6/littlelink-server:latest