-
Notifications
You must be signed in to change notification settings - Fork 0
65 lines (55 loc) · 1.82 KB
/
build.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
65
name: build
on:
workflow_call:
inputs:
runs-on:
required: true
type: string
ext-version:
required: false
type: string
default: latest
registry:
required: false
type: string
jobs:
build:
name: Build
runs-on: ${{ inputs.runs-on }}
timeout-minutes: 60
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
steps:
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v4
name: Install pnpm
with:
run_install: false
- uses: actions/setup-node@v4
with:
node-version: 20
cache: 'pnpm'
- name: Install dependencies
run: |
pnpm install
- name: Run Build
timeout-minutes: 20
run: pnpm build
- name: Login to quay.io
if: ${{ inputs.registry == 'quay' }}
run: podman login --username ${{ secrets.QUAY_ROBOT_NAME }} --password ${{ secrets.QUAY_ROBOT_TOKEN }} quay.io
- name: Login to ghcr.io
if: ${{ inputs.registry == 'ghcr' }}
run: podman login --username ${{ github.repository_owner }} --password ${{ secrets.GITHUB_TOKEN }} ghcr.io
- name: Build and Push Image (quay.io)
if: ${{ inputs.registry == 'quay' }}
id: build-image-quay
run: |
podman build -t quay.io/redhat-developer/podman-desktop-redhat-account-ext:${{ inputs.ext-version }} .
podman push quay.io/redhat-developer/podman-desktop-redhat-account-ext:${{ inputs.ext-version }}
- name: Build and Push Image (ghcr.io)
if: ${{ inputs.registry == 'ghcr' }}
id: build-image-ghcr
run: |
podman build -t ghcr.io/redhat-developer/podman-desktop-redhat-account-ext:latest .
podman push ghcr.io/redhat-developer/podman-desktop-redhat-account-ext:latest