Skip to content

Commit 5e0afa5

Browse files
author
Ilan Zuckerman
committed
Decoupling the image build process from the flow
1 parent 5d9f9a6 commit 5e0afa5

File tree

3 files changed

+19
-4
lines changed

3 files changed

+19
-4
lines changed

.github/workflows/main.yml

Lines changed: 17 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,9 @@ on:
66

77
jobs:
88
build:
9+
env:
10+
context: redhat-beyond/beyond
11+
image_name: beyond
912
runs-on: ubuntu-18.04
1013
steps:
1114
- name: Checkout source tree
@@ -35,8 +38,20 @@ jobs:
3538
tar -xzf geckodriver-v0.26.0-linux64.tar.gz -C geckodriver
3639
pip install -r tests/requirements-test.txt
3740
38-
- name: Build the docker-compose stack
39-
run: docker-compose up -d
41+
# - name: Build the docker-compose stack
42+
# run: docker-compose up -d
43+
44+
- name: Build image
45+
uses: docker/build-push-action@v2
46+
with:
47+
path: ${{ env.context }}
48+
push: false
49+
repository: ${{ env.image_name }}
50+
51+
- name: Test image
52+
run: |
53+
echo "Running: docker run -p 5000:5000 ${image_name}"
54+
docker run -p 5000:5000 ${image_name}
4055
4156
- name: Execute tests
4257
run: |

Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,4 +12,4 @@ COPY . .
1212
RUN pip3 install -r requirements.txt
1313
EXPOSE 5000
1414

15-
ENTRYPOINT python3 app.py runserver > web-application.log
15+
ENTRYPOINT python3 app.py runserver > web-application.log

docker-compose.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
version: '3.9'
22
services:
33
beyond:
4-
build: .
4+
image: quay.io/redhat-beyond/beyond
55
container_name: beyond
66
ports:
77
- "5000:5000"

0 commit comments

Comments
 (0)