-
Notifications
You must be signed in to change notification settings - Fork 284
42 lines (38 loc) · 1.25 KB
/
build-container.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
name: Build Container
on:
push:
branches:
- master
- develop
- release23
- release33
jobs:
build:
name: Build Containers
if: github.repository == 'xibosignage/xibo-cms'
runs-on: ubuntu-22.04
steps:
- name: Checkout
uses: actions/checkout@v1
with:
fetch-depth: 1
# Latest
- name: Build Latest
if: github.ref == 'refs/heads/master'
run: |
docker build . -t ghcr.io/xibosignage/xibo-cms:latest --build-arg GIT_COMMIT=${GITHUB_SHA}
- name: Push Latest
if: github.ref == 'refs/heads/master'
run: |
docker login ghcr.io --username ${{ github.actor }} --password ${{ secrets.GITHUB_TOKEN }}
docker push ghcr.io/xibosignage/xibo-cms:latest
# Release branch
- name: Build Branch
if: github.ref != 'refs/heads/master'
run: |
docker build . -t ghcr.io/xibosignage/xibo-cms:${GITHUB_REF##*/} --build-arg GIT_COMMIT=${GITHUB_SHA}
- name: Push Branch
if: github.ref != 'refs/heads/master'
run: |
docker login ghcr.io --username ${{ github.actor }} --password ${{ secrets.GITHUB_TOKEN }}
docker push ghcr.io/xibosignage/xibo-cms:${GITHUB_REF##*/}