Skip to content
This repository was archived by the owner on Dec 22, 2022. It is now read-only.

Commit f0a9857

Browse files
author
Mathieu Benoit
committed
fix ci: Dockerfile path and git clone with submodules
1 parent 4441b82 commit f0a9857

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

.github/workflows/ci.yml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@ jobs:
1414
runs-on: ubuntu-20.04
1515
steps:
1616
- uses: actions/[email protected]
17+
with:
18+
submodules: true
1719
- uses: google-github-actions/[email protected]
1820
with:
1921
project_id: ${{ secrets.CONTAINER_REGISTRY_PROJECT_ID }}
@@ -33,21 +35,21 @@ jobs:
3335
- name: manage base images
3436
run: |
3537
# Grab the build base image in our private registry
36-
baseImage=$(cat ${_APP_NAME}/Dockerfile | grep 'FROM alpine')
38+
baseImage=$(cat Dockerfile | grep 'FROM alpine')
3739
baseImage=($baseImage)
3840
docker pull ${baseImage[1]}
3941
newImage=$(echo ${baseImage[1]} | sed "s,alpine,${_CONTAINER_REGISTRY_NAME}/alpine,g")
4042
docker tag ${baseImage[1]} $newImage
4143
docker push $newImage
4244
# Grab the runtime base image in our private registry
43-
baseImage=$(cat ${_APP_NAME}/Dockerfile | grep 'FROM nginxinc')
45+
baseImage=$(cat Dockerfile | grep 'FROM nginxinc')
4446
baseImage=($baseImage)
4547
docker pull ${baseImage[1]}
4648
newImage=$(echo ${baseImage[1]} | sed "s,nginxinc,${_CONTAINER_REGISTRY_NAME},g")
4749
docker tag ${baseImage[1]} $newImage
4850
docker push $newImage
4951
# Use the base images from our own private registry
50-
sed -i "s,FROM alpine,FROM ${_CONTAINER_REGISTRY_NAME}/alpine,g;s,FROM nginxinc,FROM ${_CONTAINER_REGISTRY_NAME},g" ${_APP_NAME}/Dockerfile
52+
sed -i "s,FROM alpine,FROM ${_CONTAINER_REGISTRY_NAME}/alpine,g;s,FROM nginxinc,FROM ${_CONTAINER_REGISTRY_NAME},g" Dockerfile
5153
- name: build container
5254
run: |
5355
docker build --tag ${IMAGE_NAME} .

0 commit comments

Comments
 (0)