-
Notifications
You must be signed in to change notification settings - Fork 3
82 lines (70 loc) · 2.29 KB
/
ngshare.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
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
---
name: Ngshare
on:
push:
branches:
- master
- dev
paths:
- .github/**
- hub/**
- ci/**
jobs:
build-and-publish-dev:
name: Deploy Dev
runs-on: ubuntu-latest
if: github.event_name == 'push' && github.ref == 'refs/heads/dev'
steps:
- uses: actions/checkout@v2
- name: Set up Docker Buildx
id: buildx
uses: docker/setup-buildx-action@v1
- name: Login to GitHub Container Registry
uses: docker/login-action@v1
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GH_TOKEN }}
- name: Build and publish to ghcr.io
id: build_and_deploy_to_ghcr
run: |
bash ci/build-and-deploy.sh --deployment dev --registry ghcr.io --image ngshare --publish latest
- name: Login to Quay Container Registry
uses: docker/login-action@v1
with:
registry: quay.io
username: ${{ secrets.QUAY_USERNAME }}
password: ${{ secrets.QUAY_SECRET }}
- name: Build and publish to quay.io
id: build_and_deploy_to_quay
run: |
bash ci/build-and-deploy.sh --deployment dev --registry quay.io --image ngshare --publish latest
build-and-publish-prod:
name: Deploy Prod
runs-on: ubuntu-latest
if: github.event_name == 'push' && github.ref == 'refs/heads/master'
steps:
- uses: actions/checkout@v2
- name: Set up Docker Buildx
id: buildx
uses: docker/setup-buildx-action@v1
- name: Login to GitHub Container Registry
uses: docker/login-action@v1
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GH_TOKEN }}
- name: Build and publish to ghcr.io
id: build_and_deploy_to_ghcr
run: |
bash ci/build-and-deploy.sh --deployment prod --registry ghcr.io --image ngshare --publish latest
- name: Login to Quay Container Registry
uses: docker/login-action@v1
with:
registry: quay.io
username: ${{ secrets.QUAY_USERNAME }}
password: ${{ secrets.QUAY_SECRET }}
- name: Build and publish to ghcr.io
id: build_and_deploy_to_quay
run: |
bash ci/build-and-deploy.sh --deployment prod --registry quay.io --image ngshare --publish latest