-
Notifications
You must be signed in to change notification settings - Fork 2
45 lines (42 loc) · 1.2 KB
/
main.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
name: Docker Hub CD (Node.js)
on:
push:
branches: [main]
pull_request:
branches: [main]
env:
IMAGE_NAME: doganm95/ppsspp-remote-disc-server
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [14.x, 15.x]
steps:
- uses: actions/checkout@master
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@master
with:
node-version: ${{ matrix.node-version }}
- run: docker build -t $IMAGE_NAME ./nodejs
push-to-docker-hub:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@master
- name: Set up QEMU
uses: docker/setup-qemu-action@master
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@master
- name: Login to DockerHub
uses: docker/login-action@master
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_ACCESSTOKEN }}
- name: Build and push
uses: docker/build-push-action@master
with:
context: ./nodejs
file: ./nodejs/Dockerfile
push: true
tags: ${{ env.IMAGE_NAME }}:latest