-
Notifications
You must be signed in to change notification settings - Fork 0
57 lines (53 loc) · 2.59 KB
/
Copy pathdocker-ksul.yml
File metadata and controls
57 lines (53 loc) · 2.59 KB
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
# DSpace Docker image build for hub.docker.com
name: Docker images
# Run this Build for all pushes to 'main' or maintenance branches, or tagged releases.
# Also run for PRs to ensure PR doesn't break Docker build process
# NOTE: uses "reusable-docker-build.yml" in kstatelibraries/kstatelibraries to
# actually build each of the Docker images
# https://github.com/kstatelibraries/kstatelibraries/blob/main/.github/workflows/reusable-docker-build.yml
#
on:
push:
branches:
- 'ksul_dspace-**'
tags:
- 'ksul_dspace-**'
pull_request:
permissions:
contents: read # to fetch code (actions/checkout)
jobs:
#############################################################
# Build/Push the 'kstatelibraries/krex-dspace-angular' image
#############################################################
krex-dspace-angular:
# Ensure this job never runs on forked repos. It's only executed for 'kstatelibraries/dspace-angular'
if: github.repository == 'kstatelibraries/dspace-angular'
# Use the reusable-docker-build.yml script from kstatelibraries/kstatelibraries repo to build our Docker image
uses: kstatelibraries/.github/.github/workflows/reusable-docker-build.yml@main
with:
build_id: dspace-dspace-angular-dev
image_name: kstatelibraries/krex-dspace-angular
dockerfile_path: ./Dockerfile
arch_matrix: "[ 'linux/amd64' ]"
secrets:
DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }}
DOCKER_ACCESS_TOKEN: ${{ secrets.DOCKER_ACCESS_TOKEN }}
#############################################################
# Build/Push the 'kstatelibraries/krex-dspace-angular' image ('-dist' tag)
#############################################################
krex-dspace-angular-dist:
# Ensure this job never runs on forked repos. It's only executed for 'kstatelibraries/dspace-angular'
if: github.repository == 'kstatelibraries/dspace-angular'
# Use the reusable-docker-build.yml script from kstatelibraries/kstatelibraries repo to build our Docker image
uses: kstatelibraries/.github/.github/workflows/reusable-docker-build.yml@main
with:
build_id: krex-dspace-angular-dist
image_name: kstatelibraries/krex-dspace-angular
dockerfile_path: ./Dockerfile.dist
arch_matrix: "[ 'linux/amd64' ]"
# As this is a "dist" image, its tags are all suffixed with "-dist". Otherwise, it uses the same
# tagging logic as the primary 'kstatelibraries/krex-dspace-angular' image above.
tags_flavor: suffix=-dist
secrets:
DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }}
DOCKER_ACCESS_TOKEN: ${{ secrets.DOCKER_ACCESS_TOKEN }}