File tree Expand file tree Collapse file tree 4 files changed +76
-1
lines changed
integration-tests/test-api Expand file tree Collapse file tree 4 files changed +76
-1
lines changed Original file line number Diff line number Diff line change
1
+ name : Test API Image CI
2
+
3
+ on :
4
+ pull_request :
5
+ paths :
6
+ - integration-tests/test-api/**
7
+
8
+ concurrency :
9
+ group : ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
10
+ cancel-in-progress : true
11
+
12
+
13
+ jobs :
14
+ build :
15
+ name : Build API Test
16
+ uses : codecov/gha-workflows/.github/workflows/build-and-push-dockerhub.yml@v1.2.14
17
+ secrets : inherit
18
+ with :
19
+ push : false
20
+ image_name : codecov-javascript-bundler-plugins-test-api
21
+ docker_path : integration-tests/test-api
Original file line number Diff line number Diff line change
1
+ name : Test API Image Push
2
+
3
+ on :
4
+ push :
5
+ branches :
6
+ - main
7
+ paths :
8
+ - integration-tests/test-api/**
9
+
10
+ concurrency :
11
+ group : ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
12
+ cancel-in-progress : true
13
+
14
+
15
+ jobs :
16
+ push :
17
+ name : Push API Test
18
+ if : github.repository_owner == 'codecov'
19
+ uses : codecov/gha-workflows/.github/workflows/build-and-push-dockerhub.yml@v1.2.14
20
+ secrets : inherit
21
+ with :
22
+ push : true
23
+ image_name : codecov-javascript-bundler-plugins-test-api
24
+ docker_path : integration-tests/test-api
Original file line number Diff line number Diff line change
1
+ DOCKERHUB_REPO ?= codecov
2
+ IMAGE_NAME ?= codecov-javascript-bundler-plugins-test-api
3
+ DOCKER_PATH ?= integration-tests/test-api
4
+ OS_NAME := $(shell uname -s | tr A-Z a-z)
5
+ build_date := $(shell git show -s --date=iso8601-strict --pretty=format:% cd $$sha)
6
+ BUILD_PLATFORM := $(shell docker system info --format '{{.OSType}}/{{.Architecture}}')
7
+ sha := $(shell git rev-parse --short=7 HEAD)
8
+ dockerhub_image := ${DOCKERHUB_REPO}/${IMAGE_NAME}
9
+ export DOCKER_BUILDKIT := 1
10
+
11
+ build.${IMAGE_NAME} :
12
+ docker build -f ${DOCKER_PATH} /Dockerfile ${DOCKER_PATH} -t ${dockerhub_image} :latest \
13
+ -t ${dockerhub_image} :${sha} \
14
+ --label " org.label-schema.build-date" =" $( build_date) " \
15
+ --label " org.label-schema.name" =" ${IMAGE_NAME} " \
16
+ --label " org.label-schema.vendor" =" Codecov" \
17
+ --label " org.label-schema.version" =" ${sha} " \
18
+ --build-arg BUILDPLATFORM=${BUILD_PLATFORM}
19
+
20
+ tag.${IMAGE_NAME} :
21
+ docker tag ${dockerhub_image} :${sha} ${dockerhub_image} :latest
22
+
23
+ push.${IMAGE_NAME} :
24
+ docker push ${dockerhub_image} :latest
25
+ docker push ${dockerhub_image} :${sha}
26
+
27
+ save.${IMAGE_NAME} :
28
+ docker save -o ${IMAGE_NAME} .tar ${dockerhub_image} :${sha}
Original file line number Diff line number Diff line change 1
- FROM --platform=arm64 node:20-alpine
1
+ # syntax=docker/dockerfile:1
2
+ ARG BUILDPLATFORM=arm64
3
+ FROM --platform=$BUILDPLATFORM node:20-alpine
2
4
WORKDIR /app
3
5
4
6
ENV NODE_ENV=production
You can’t perform that action at this time.
0 commit comments