Skip to content

Commit 5711c81

Browse files
committed
- added tag files
1 parent fc801bf commit 5711c81

File tree

3 files changed

+13
-12
lines changed

3 files changed

+13
-12
lines changed

.github/workflows/build-docker-images.yml

Lines changed: 11 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ on:
1818
jobs:
1919
build-docker-images:
2020
runs-on: ubuntu-20.04
21-
if: github.event_name == 'pull_request' && github.event.action == 'opened'
21+
if: github.event_name == 'pull_request' && (github.event.action == 'opened' || github.event.action == 'edited')
2222
steps:
2323
- name: Pull main repository
2424
uses: actions/checkout@v3
@@ -28,11 +28,13 @@ jobs:
2828
- name: Build docker images
2929
run: |
3030
cd docker/enclave-base
31-
docker build -t fortanix/enclave-base .
31+
TAG=$(cat tag.txt)
32+
docker build -t fortanix/enclave-base:$TAG .
3233
docker save -o /tmp/enclave-base.tar fortanix/enclave-base
3334
3435
cd ../parent-base
35-
docker build -t fortanix/parent-base .
36+
TAG=$(cat tag.txt)
37+
docker build -t fortanix/parent-base:$TAG .
3638
docker save -o /tmp/parent-base.tar fortanix/parent-base
3739
3840
- name: Upload enclave-base artifact
@@ -57,26 +59,23 @@ jobs:
5759
with:
5860
name: enclave-base
5961
path: /tmp/enclave-base
60-
- name: Load enclave-base image
61-
run: |
62-
docker load --input /tmp/enclave-base/enclave-base.tar
6362

6463
- name: Download parent-base artifact
6564
uses: actions/download-artifact@v3
6665
with:
6766
name: parent-base
6867
path: /tmp/parent-base
69-
- name: Load parent-base image
70-
run: |
71-
docker load --input /tmp/parent-base/parent-base.tar
7268

7369
- name: Login to Docker Hub
7470
uses: docker/login-action@v1
7571
with:
7672
username: ${{ secrets.DOCKER_USERNAME }}
7773
password: ${{ secrets.DOCKER_PASSWORD }}
7874

79-
- name: Push docker images
75+
- name: Load and push docker images
8076
run: |
81-
docker push fortanix/enclave-base
82-
docker push fortanix/parent-base
77+
enclave_base_load_output = docker load --input /tmp/enclave-base/enclave-base.tar
78+
parent_base_load_output = docker load --input /tmp/parent-base/parent-base.tar
79+
80+
docker push $(echo "enclave_base_load_output" | awk '{print $3}')
81+
docker push $(echo "parent_base_load_output" | awk '{print $3}')

docker/enclave-base/tag

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
1.0.2

docker/parent-base/tag

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
1.1.3

0 commit comments

Comments
 (0)