From 8ebfca7dc49aa60d36f20be7b8538bde22750fff Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christian=20K=C3=B6hnenkamp?= Date: Thu, 15 Sep 2022 21:04:14 +0200 Subject: [PATCH 1/5] Add github action workflow --- .github/workflows/build_docker.yaml | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 .github/workflows/build_docker.yaml diff --git a/.github/workflows/build_docker.yaml b/.github/workflows/build_docker.yaml new file mode 100644 index 0000000..342e96f --- /dev/null +++ b/.github/workflows/build_docker.yaml @@ -0,0 +1,16 @@ +name: Docker Image CI + +on: + push: + branches: [ "develop" ] + pull_request: + branches: [ "develop" ] + +jobs: + build: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v3 + - name: Build the Docker image + run: docker build docker/ubuntu_18_04/circleci --file Dockerfile --tag heliconwave/circleci-ubuntu-18.04:$(date +%s) \ No newline at end of file From 324494f307ed1063e3d43ec5e07cac893a717cd7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christian=20K=C3=B6hnenkamp?= Date: Thu, 15 Sep 2022 21:07:49 +0200 Subject: [PATCH 2/5] Fix context for docker --- .github/workflows/build_docker.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build_docker.yaml b/.github/workflows/build_docker.yaml index 342e96f..1c204cd 100644 --- a/.github/workflows/build_docker.yaml +++ b/.github/workflows/build_docker.yaml @@ -13,4 +13,4 @@ jobs: steps: - uses: actions/checkout@v3 - name: Build the Docker image - run: docker build docker/ubuntu_18_04/circleci --file Dockerfile --tag heliconwave/circleci-ubuntu-18.04:$(date +%s) \ No newline at end of file + run: docker build docker/ --file docker/ubuntu_18_04/circleci/Dockerfile --tag heliconwave/circleci-ubuntu-18.04:$(date +%s) \ No newline at end of file From 8eb34b1b6684131f976d4254b33a681a3c9c4c9c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christian=20K=C3=B6hnenkamp?= Date: Thu, 15 Sep 2022 21:12:41 +0200 Subject: [PATCH 3/5] Tag latest image --- .github/workflows/build_docker.yaml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build_docker.yaml b/.github/workflows/build_docker.yaml index 1c204cd..098631f 100644 --- a/.github/workflows/build_docker.yaml +++ b/.github/workflows/build_docker.yaml @@ -13,4 +13,8 @@ jobs: steps: - uses: actions/checkout@v3 - name: Build the Docker image - run: docker build docker/ --file docker/ubuntu_18_04/circleci/Dockerfile --tag heliconwave/circleci-ubuntu-18.04:$(date +%s) \ No newline at end of file + run: docker build docker/ --file docker/ubuntu_18_04/circleci/Dockerfile \ + --tag heliconwave/circleci-ubuntu-18.04:$(date +%s) \ + --tag heliconwave/circleci-ubuntu-18.04:latest + - name: Push the Docker image + run: docker images From 1ad874abd71e571bb97f1925d78e60f46068a73c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christian=20K=C3=B6hnenkamp?= Date: Thu, 15 Sep 2022 21:15:01 +0200 Subject: [PATCH 4/5] Use multiline YAML --- .github/workflows/build_docker.yaml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build_docker.yaml b/.github/workflows/build_docker.yaml index 098631f..6bb3500 100644 --- a/.github/workflows/build_docker.yaml +++ b/.github/workflows/build_docker.yaml @@ -13,8 +13,9 @@ jobs: steps: - uses: actions/checkout@v3 - name: Build the Docker image - run: docker build docker/ --file docker/ubuntu_18_04/circleci/Dockerfile \ - --tag heliconwave/circleci-ubuntu-18.04:$(date +%s) \ + run: - | + docker build docker/ --file docker/ubuntu_18_04/circleci/Dockerfile + --tag heliconwave/circleci-ubuntu-18.04:$(date +%s) --tag heliconwave/circleci-ubuntu-18.04:latest - name: Push the Docker image run: docker images From 12796befaaa58b58aa31572ebdf01b96a5302484 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christian=20K=C3=B6hnenkamp?= Date: Thu, 15 Sep 2022 21:17:20 +0200 Subject: [PATCH 5/5] Fix syntax error --- .github/workflows/build_docker.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build_docker.yaml b/.github/workflows/build_docker.yaml index 6bb3500..c9ff7cb 100644 --- a/.github/workflows/build_docker.yaml +++ b/.github/workflows/build_docker.yaml @@ -13,7 +13,7 @@ jobs: steps: - uses: actions/checkout@v3 - name: Build the Docker image - run: - | + run: -| docker build docker/ --file docker/ubuntu_18_04/circleci/Dockerfile --tag heliconwave/circleci-ubuntu-18.04:$(date +%s) --tag heliconwave/circleci-ubuntu-18.04:latest