-
Notifications
You must be signed in to change notification settings - Fork 0
37 lines (30 loc) · 975 Bytes
/
build.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
name: Build and push docker image
on: [push]
env:
DOCKER_REPO: codex-team/codex-figma-notify
jobs:
build:
runs-on: ubuntu-20.04
steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Login to GitHub Container Registry
uses: docker/login-action@v1
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and push production image
if: endsWith(github.ref, '/prod')
uses: docker/build-push-action@v2
with:
context: .
tags: ghcr.io/${{ env.DOCKER_REPO }}:prod
push: ${{ endsWith(github.ref, '/prod') }}
- name: Build and push stage image
if: endsWith(github.ref, '/stage')
uses: docker/build-push-action@v2
with:
context: .
tags: ghcr.io/${{ env.DOCKER_REPO }}:stage
push: ${{ endsWith(github.ref, '/stage') }}