forked from digirati-co-uk/timeliner
-
Notifications
You must be signed in to change notification settings - Fork 2
48 lines (43 loc) · 1.41 KB
/
podman-image.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
# Builds image and stores in ghcr.io then sends webhook to deploy new image to timeliner.dlib.indiana.edu
name: Podman Image CI
on:
push:
branches: [ "main", "demo" ]
env:
REGISTRY_USER: ${{ github.actor }}
REGISTRY_PASSWORD: ${{ github.token }}
IMAGE_REGISTRY: ghcr.io/iublibtech
IMAGE_TAG: ${{ fromJSON('{"refs/heads/main":"develop","refs/heads/demo":"production"}')[github.ref] }}
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Install Node 14
uses: actions/setup-node@v3
with:
node-version: 14
cache: 'yarn'
- name: Yarn install
run: yarn install --frozen-lockfile # optional, --immutable
- name: Yarn build
# Explicitly set CI to false to avoid elevating warnings to errors
run: CI=false yarn build
- name: Build Image
id: build_image
uses: redhat-actions/buildah-build@v2
with:
image: timeliner
tags: ${{ env.IMAGE_TAG }} ${{ github.sha }}
containerfiles: ./Dockerfile
oci: true
- name: Push To GHCR
uses: redhat-actions/push-to-registry@v2
with:
image: ${{ steps.build_image.outputs.image }}
tags: ${{ steps.build_image.outputs.tags }}
registry: ${{ env.IMAGE_REGISTRY }}
username: ${{ env.REGISTRY_USER }}
password: ${{ env.REGISTRY_PASSWORD }}
extra-args: |
--disable-content-trust