-
Notifications
You must be signed in to change notification settings - Fork 4
41 lines (37 loc) · 1.51 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
# This workflow will do a clean install of node dependencies, build the source code and run tests across different versions of node
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions
name: Docker CI
on:
push:
branches:
- master
pull_request:
branches:
- master
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [12.x]
steps:
- uses: actions/checkout@v2
- name: Build and push Docker images
# You may pin to the exact commit or the version.
# uses: docker/build-push-action@92e71463491f2d026a477188b8ad3a0fdd9d672c
uses: docker/build-push-action@v1.1.0
with:
# Username used to log in to a Docker registry. If not set then no login will occur
username: ${{ secrets.DOCKER_ID }} # optional
# Password or personal access token used to log in to a Docker registry. If not set then no login will occur
password: ${{ secrets.DOCKER_PW }}
# Docker repository to tag the image with
repository: csuos/nera
# Automatically tags the built image with the git reference as per the readme
build_args: REACT_APP_ADMIN_KEY=${{ secrets.REACT_APP_ADMIN_KEY }}
tag_with_ref: true # optional
tag_with_sha: true
tags: latest
# Comma-delimited list of images to consider as cache sources
cache_froms: csuos/nera:latest # optional
push: ${{ startsWith(secrets.DOCKER_ID, 'csuos') }}