-
Notifications
You must be signed in to change notification settings - Fork 1
38 lines (38 loc) · 1.44 KB
/
production.yaml
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
name: Production
on:
push:
branches:
- "main"
pull_request:
branches:
- "main"
jobs:
build:
if: github.event_name == 'push' && contains(toJson(github.event.commits), '***NO_CI***') == false && contains(toJson(github.event.commits), '[ci skip]') == false && contains(toJson(github.event.commits), '[skip ci]') == false
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2.3.4
- name: Set output
id: vars
run: echo ::set-output name=tag::$(git rev-parse --short HEAD)
- name: Set up QEMU
uses: docker/setup-qemu-action@v1
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
- name: Login to ACR
uses: docker/login-action@v1
with:
username: ${{ secrets.CVCIO_CLIENT_ID }}
password: ${{ secrets.CVCIO_CLIENT_SECRET }}
- name: Build and push Docker images
uses: docker/build-push-action@v2.1.0
with:
push: true
context: .
file: ./Dockerfile
platforms: linux/amd64
build-args: NODE_ENV=production,VUE_APP_GOOGLE_TAG=${{ secrets.VUE_APP_GOOGLE_TAG }},VUE_APP_MAPBOX=${{ secrets.VUE_APP_MAPBOX }},VUE_APP_MAPBOX_STYLE=${{ secrets.VUE_APP_MAPBOX_STYLE }}
tags: |
${{ secrets.CVCIO_CONTAINER_REGISTRY }}/covid-19:${{ steps.vars.outputs.tag }}
${{ secrets.CVCIO_CONTAINER_REGISTRY }}/covid-19:latest