-
Notifications
You must be signed in to change notification settings - Fork 0
62 lines (51 loc) · 1.54 KB
/
docker.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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
name: Docker
on:
push:
branches:
- "canon"
- "dev"
workflow_dispatch:
pull_request:
branches:
- "canon"
- "dev"
workflow_dispatch:
env:
APP_VERSION: 0.1.0
jobs:
push:
runs-on: ubuntu-latest
timeout-minutes: 15
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v2
with:
node-version: 16.17
- name: install node modules
run: npm install --legacy-peer-deps
- name: Log in to DockerHub
uses: docker/login-action@v2
with:
username: ${{ secrets.LOGIN_DOCKERHUB }}
password: ${{ secrets.PASSWORD_DOCKERHUB }}
- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@v4
with:
images: arkulturtest/sidious
- name: Build and push canon Docker image
if: github.ref == 'refs/heads/canon' && github.event_name != 'pull_request'
uses: docker/build-push-action@v3
with:
context: .
push: true
tags: arkulturtest/sidious:canon, arkulturtest/sidious:${{ env.APP_VERSION }}
labels: ${{ steps.meta.outputs.labels }}
- name: Build and push dev docker image
if: github.ref == 'refs/heads/dev' && github.event_name != 'pull_request'
uses: docker/build-push-action@v3
with:
context: .
push: true
tags: arkulturtest/sidious:${{ env.APP_VERSION }}-dev, arkulturtest/sidious:dev
labels: ${{ steps.meta.outputs.labels }}