-
Notifications
You must be signed in to change notification settings - Fork 3
56 lines (47 loc) · 1.31 KB
/
build-image-novnc.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
---
name: build-image-novnc
on:
push:
branches:
- main
tags:
- "v*"
paths:
- "images/showroom-novnc/**"
permissions:
packages: write
concurrency:
group: build
cancel-in-progress: false
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: checkout
uses: actions/checkout@v3
- name: set datetime
run: |
echo "datetime=$(date -u +'%Y-%m-%dT%H:%M:%SZ')" >> $GITHUB_ENV
- name: Build image
id: build-image
uses: redhat-actions/buildah-build@v2
with:
image: showroom-novnc
tags: latest ${{ github.ref_name }}
context: images/showroom-novnc/
containerfiles: |
./images/showroom-novnc/Containerfile
build-args: |
CREATED_AT=${{ env.datetime }}
GITHUB_SHA=${{ github.sha }}
- name: push image to ghcr.io
id: push-to-ghcr
uses: redhat-actions/push-to-registry@v2
with:
image: ${{ steps.build-image.outputs.image }}
tags: ${{ steps.build-image.outputs.tags }}
registry: ghcr.io/rhpds
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Print image url
run: echo "Image pushed to ${{ steps.push-to-ghcr.outputs.registry-paths }}"