-
Notifications
You must be signed in to change notification settings - Fork 2
45 lines (43 loc) · 1.21 KB
/
build-image.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
name: Build and push images
on:
workflow_dispatch:
inputs:
buildType:
description: Decide on what to build
required: true
type: choice
options:
- build_push
- build_only
push:
branches:
- main
jobs:
build_and_push:
name: ${{ matrix.app.name }} (${{ matrix.arch }})
runs-on: ubuntu-latest
permissions:
packages: write
steps:
- name: Login to GHCR
uses: docker/login-action@f4ef78c080cd8ba55a85445d5b36e214a81df20a # v2.1.0
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- uses: actions/checkout@v4
with:
ref: ${{ inputs.gitRef }}
- name: Build images (without pushing to registry)
if: ${{ inputs.buildType == 'build_only' }}
env:
DRY_RUN: "1"
APP: ckan-harvest-source
ARCH: amd64
run: ./.github/workflows/build-image.sh
- name: Build and push images
if: ${{ inputs.buildType == 'build_push' || github.ref == 'refs/heads/main' }}
env:
APP: ckan-harvest-source
ARCH: amd64
run: ./.github/workflows/build-image.sh