This repository has been archived by the owner on Mar 17, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 14
64 lines (56 loc) · 1.78 KB
/
build-studio.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
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
name: Build studio and ingress
on:
push:
branches:
- main
- develop
paths:
- 'components/studio/**'
pull_request:
branches:
- main
- develop
paths:
- 'components/studio/**'
release:
types: [published]
jobs:
build-containers:
runs-on: ubuntu-20.04
permissions:
packages: write
contents: read
steps:
- uses: actions/checkout@v2
- name: Setup variables
id: wf-vars
env:
BASE_BRANCH: ${{ github.base_ref }}
run: |
IMAGE_TAG=${GITHUB_REF##*/}
VERSION=${GITHUB_REF##*-}
IMAGE_NAME="studio"
echo "BASE_BRANCH=${BASE_BRANCH}"
echo "IMAGE_TAG=${IMAGE_TAG}"
echo ::set-output name=IMAGE_NAME::$IMAGE_NAME
echo ::set-output name=IMAGE_TAG::$IMAGE_TAG
- name: Log in to GitHub Docker Registry
uses: docker/login-action@v1
with:
registry: docker.pkg.github.com
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: build and push studio
uses: docker/build-push-action@v2
with:
context: components/studio/
push: "${{ github.event_name != 'pull_request' }}"
tags: docker.pkg.github.com/${{ github.repository }}/${{ steps.wf-vars.outputs.IMAGE_NAME }}:${{ steps.wf-vars.outputs.IMAGE_TAG }}
file: components/studio/Dockerfile
- name: docker build ingress
uses: docker/build-push-action@v2
with:
context: components/studio/
push: "${{ github.event_name != 'pull_request' }}"
tags: docker.pkg.github.com/${{ github.repository }}/ingress:${{ steps.wf-vars.outputs.IMAGE_TAG }}
file: components/studio/Dockerfile.nginx