This repository was archived by the owner on Jan 24, 2025. It is now read-only.
File tree 3 files changed +21
-5
lines changed
3 files changed +21
-5
lines changed Original file line number Diff line number Diff line change 9
9
type : choice
10
10
options :
11
11
- build_push
12
+ - build_push_dev
12
13
- build_only
13
14
push :
14
15
branches :
43
44
APP : datagovuk_publish
44
45
ARCH : amd64
45
46
run : ./docker/build-image.sh
47
+ - name : Build and push dev images
48
+ if : ${{ inputs.buildType == 'build_push_dev' || github.ref == 'refs/heads/main' }}
49
+ env :
50
+ APP : datagovuk_publish
51
+ ARCH : amd64
52
+ DEV : " 1"
53
+ run : ./docker/build-image.sh
Original file line number Diff line number Diff line change @@ -11,7 +11,7 @@ def call(package)
11
11
coupled_resource : package . get_extra ( "coupled-resource" ) ,
12
12
dataset_reference_date : package . get_extra ( "dataset-reference-date" ) ,
13
13
frequency_of_update : package . get_extra ( "frequency-of-update" ) ,
14
- harvest_object_id : package . get_extra ( "harvest_object_id" ) || package . get_harvest ( "harvest_object_id" ) ,
14
+ harvest_object_id : package . get_harvest ( "harvest_object_id" ) || package . get_extra ( "harvest_object_id" ) ,
15
15
harvest_source_reference : package . get_extra ( "harvest_source_reference" ) ,
16
16
import_source : package . get_extra ( "import_source" ) ,
17
17
metadata_date : package . get_extra ( "metadata-date" , 10 ) ,
Original file line number Diff line number Diff line change 4
4
5
5
build () {
6
6
if [ " ${ARCH} " = " amd64" ]; then
7
- docker build . -t " ghcr.io/alphagov/${APP} :${1} " -f " docker/Dockerfile"
7
+ docker build . -t " ghcr.io/alphagov/${APP} :${2}${ 1} " -f " docker/${2} Dockerfile"
8
8
else
9
- docker buildx build --platform " linux/${ARCH} " . -t " ghcr.io/alphagov/${APP} :${1} " -f " docker/Dockerfile"
9
+ docker buildx build --platform " linux/${ARCH} " . -t " ghcr.io/alphagov/${APP} :${2}${ 1} " -f " docker/${2} Dockerfile"
10
10
fi
11
11
}
12
12
@@ -16,10 +16,18 @@ if [[ -n ${GH_REF:-} ]]; then
16
16
DOCKER_TAG=" ${GH_REF} "
17
17
fi
18
18
19
- build " ${DOCKER_TAG} "
19
+ if [[ -n ${DEV:- } ]]; then
20
+ build " ${DOCKER_TAG} " " dev."
21
+ else
22
+ build " ${DOCKER_TAG} " " "
23
+ fi
20
24
21
25
if [[ -n ${DRY_RUN:- } ]]; then
22
26
echo " Dry run; not pushing to registry"
23
27
else
24
- docker push " ghcr.io/alphagov/${APP} :${DOCKER_TAG} "
28
+ if [[ -n ${DEV:- } ]]; then
29
+ docker push " ghcr.io/alphagov/${APP} :dev.${DOCKER_TAG} "
30
+ else
31
+ docker push " ghcr.io/alphagov/${APP} :${DOCKER_TAG} "
32
+ fi
25
33
fi
You can’t perform that action at this time.
0 commit comments