From 8063b8b5f68ecb448a66d59c323a2ffc273eef61 Mon Sep 17 00:00:00 2001 From: Daniel Marshall Date: Wed, 16 Feb 2022 00:39:24 +1100 Subject: [PATCH 01/34] marshalldaniel/c05-actions01 --- marshalldaniel/README.md | 1 + 1 file changed, 1 insertion(+) create mode 100644 marshalldaniel/README.md diff --git a/marshalldaniel/README.md b/marshalldaniel/README.md new file mode 100644 index 0000000..8f6e7ef --- /dev/null +++ b/marshalldaniel/README.md @@ -0,0 +1 @@ +Empty :) From 088fa5018b95af201284c33f5e587795a04220bd Mon Sep 17 00:00:00 2001 From: Daniel Marshall Date: Wed, 16 Feb 2022 01:04:59 +1100 Subject: [PATCH 02/34] adding workflow --- .../marshalldaniel-c05-actions01.yml | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 .github/workflows/marshalldaniel-c05-actions01.yml diff --git a/.github/workflows/marshalldaniel-c05-actions01.yml b/.github/workflows/marshalldaniel-c05-actions01.yml new file mode 100644 index 0000000..ff9a38f --- /dev/null +++ b/.github/workflows/marshalldaniel-c05-actions01.yml @@ -0,0 +1,19 @@ +on: + pull_request: + paths: + - 'marshalldaniel/*' + +jobs: + comment_pr: + runs-on: ubuntu-latest + name: Comment on all PRs targeting marshalldaniel/* + steps: + - name: Checkout + uses: actions/checkout@v1 + + - name: Comment PR + uses: thollander/actions-comment-pull-request@v1 + + with: + message: 'Well done ${{ secrets.MARSHALLDANIEL_NAME }} ! This is a nice PR.' + GITHUB_TOKEN: ${{ secrets.MARSHALLDANIEL_GHKEY }} \ No newline at end of file From 3bd4b07fb45096ac0deafb27f72eee4873455232 Mon Sep 17 00:00:00 2001 From: Daniel Marshall Date: Thu, 17 Feb 2022 11:32:09 +1100 Subject: [PATCH 03/34] marshalldaniel/c05-actions02 --- .../marshalldaniel-c05-actions02.yml | 31 +++++++++++++++++++ marshalldaniel/c05-actions02/Dockerfile | 2 ++ marshalldaniel/c05-actions02/Makefile | 18 +++++++++++ .../c05-actions02/docker-compose.yaml | 5 +++ 4 files changed, 56 insertions(+) create mode 100644 .github/workflows/marshalldaniel-c05-actions02.yml create mode 100644 marshalldaniel/c05-actions02/Dockerfile create mode 100644 marshalldaniel/c05-actions02/Makefile create mode 100644 marshalldaniel/c05-actions02/docker-compose.yaml diff --git a/.github/workflows/marshalldaniel-c05-actions02.yml b/.github/workflows/marshalldaniel-c05-actions02.yml new file mode 100644 index 0000000..d62ae18 --- /dev/null +++ b/.github/workflows/marshalldaniel-c05-actions02.yml @@ -0,0 +1,31 @@ +on: + pull_request: + paths: + - 'marshalldaniel/c05-actions-02/*' + +jobs: + comment_pr: + runs-on: ubuntu-latest + name: 3m to build, push and comment pr + steps: + - name: Checkout + uses: actions/checkout@v2 + + - name: login docker hub + working-directory: marshalldaniel/c05-actions-02/ + run: make login_dockerhub + + - name: build docker image + working-directory: marshalldaniel/c05-actions-02/ + run: make build_image + + - name: push docker image + working-directory: marshalldaniel/c05-actions-02/ + run: make push_image + + - name: Comment PR + uses: thollander/actions-comment-pull-request@v1 + + with: + message: 'Image name ${{ env.IMAGE_NAME}} has been pushed to dockerhub' + GITHUB_TOKEN: ${{ secrets.MARSHALLDANIEL_GHKEY }}% diff --git a/marshalldaniel/c05-actions02/Dockerfile b/marshalldaniel/c05-actions02/Dockerfile new file mode 100644 index 0000000..83cea13 --- /dev/null +++ b/marshalldaniel/c05-actions02/Dockerfile @@ -0,0 +1,2 @@ +FROM httpd:2.4.41 +RUN echo "This is my GH actions exercise" > /usr/local/apache2/htdocs/index.html diff --git a/marshalldaniel/c05-actions02/Makefile b/marshalldaniel/c05-actions02/Makefile new file mode 100644 index 0000000..b516455 --- /dev/null +++ b/marshalldaniel/c05-actions02/Makefile @@ -0,0 +1,18 @@ +export SHORT_COMMIT_SHA = $(shell git rev-parse --short HEAD) +export IMAGE_NAME = $(shell git rev-parse --abbrev-ref HEAD) +DOCKER_COMPOSE = docker-compose build +DOCKERHUB_PUSH = docker push $(IMAGE_NAME):$(SHORT_COMMIT_SHA) + +all: build_image push_image + +.PHONY: build_image +build_image: + $(DOCKER_COMPOSE) + +.PHONY: login_dockerhub +login_dockerhub: + @echo ${MARSHALLDANIEL_DH_TOKEN} | docker login -u ${MARSHALLDANIEL_DH_NAME} --password-stdin + +.PHONY: push_image +push_image: + $(DOCKERHUB_PUSH) diff --git a/marshalldaniel/c05-actions02/docker-compose.yaml b/marshalldaniel/c05-actions02/docker-compose.yaml new file mode 100644 index 0000000..d2c8947 --- /dev/null +++ b/marshalldaniel/c05-actions02/docker-compose.yaml @@ -0,0 +1,5 @@ +version: '3.8' +services: + web: + image: ${IMAGE_NAME}:${SHORT_COMMIT_SHA} + build: . \ No newline at end of file From 93396e903240389b7af38740c92daecf4f69a97f Mon Sep 17 00:00:00 2001 From: Daniel Marshall Date: Thu, 17 Feb 2022 11:45:20 +1100 Subject: [PATCH 04/34] marshalldaniel/c05-actions02 --- marshalldaniel/c05-actions02/Dockerfile.v2 | 2 ++ 1 file changed, 2 insertions(+) create mode 100644 marshalldaniel/c05-actions02/Dockerfile.v2 diff --git a/marshalldaniel/c05-actions02/Dockerfile.v2 b/marshalldaniel/c05-actions02/Dockerfile.v2 new file mode 100644 index 0000000..83cea13 --- /dev/null +++ b/marshalldaniel/c05-actions02/Dockerfile.v2 @@ -0,0 +1,2 @@ +FROM httpd:2.4.41 +RUN echo "This is my GH actions exercise" > /usr/local/apache2/htdocs/index.html From b0ca73fd1a2a8cd8978a7db9ae66d6a802f72e56 Mon Sep 17 00:00:00 2001 From: Daniel Marshall Date: Thu, 17 Feb 2022 11:49:28 +1100 Subject: [PATCH 05/34] marshalldaniel/c05-actions02 --- .github/workflows/marshalldaniel-c05-actions02.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/marshalldaniel-c05-actions02.yml b/.github/workflows/marshalldaniel-c05-actions02.yml index d62ae18..71dd0bb 100644 --- a/.github/workflows/marshalldaniel-c05-actions02.yml +++ b/.github/workflows/marshalldaniel-c05-actions02.yml @@ -28,4 +28,4 @@ jobs: with: message: 'Image name ${{ env.IMAGE_NAME}} has been pushed to dockerhub' - GITHUB_TOKEN: ${{ secrets.MARSHALLDANIEL_GHKEY }}% + GITHUB_TOKEN: ${{ secrets.MARSHALLDANIEL_GHKEY }} From 984c0bfcf2523b27ec7230e567682598cb93806d Mon Sep 17 00:00:00 2001 From: Daniel Marshall Date: Thu, 17 Feb 2022 11:51:46 +1100 Subject: [PATCH 06/34] marshalldaniel/c05-actions02 --- .github/workflows/marshalldaniel-c05-actions02.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/marshalldaniel-c05-actions02.yml b/.github/workflows/marshalldaniel-c05-actions02.yml index 71dd0bb..3d756d4 100644 --- a/.github/workflows/marshalldaniel-c05-actions02.yml +++ b/.github/workflows/marshalldaniel-c05-actions02.yml @@ -9,7 +9,7 @@ jobs: name: 3m to build, push and comment pr steps: - name: Checkout - uses: actions/checkout@v2 + uses: actions/checkout@v1 - name: login docker hub working-directory: marshalldaniel/c05-actions-02/ From 4676eb7f42132c27e32745394ce2f8bb26281488 Mon Sep 17 00:00:00 2001 From: Daniel Marshall Date: Thu, 17 Feb 2022 12:00:13 +1100 Subject: [PATCH 07/34] marshalldaniel/c05-actions02 --- .github/workflows/marshalldaniel-c05-actions02.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/marshalldaniel-c05-actions02.yml b/.github/workflows/marshalldaniel-c05-actions02.yml index 3d756d4..2db6f40 100644 --- a/.github/workflows/marshalldaniel-c05-actions02.yml +++ b/.github/workflows/marshalldaniel-c05-actions02.yml @@ -1,7 +1,7 @@ on: pull_request: paths: - - 'marshalldaniel/c05-actions-02/*' + - 'marshalldaniel/*' jobs: comment_pr: From e3959a38dc85cf9d233bb1939fdac48a190c610c Mon Sep 17 00:00:00 2001 From: Daniel Marshall Date: Thu, 17 Feb 2022 12:07:47 +1100 Subject: [PATCH 08/34] marshalldaniel/c05-actions02 --- .github/workflows/marshalldaniel-c05-actions02.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/marshalldaniel-c05-actions02.yml b/.github/workflows/marshalldaniel-c05-actions02.yml index 2db6f40..04cbd8e 100644 --- a/.github/workflows/marshalldaniel-c05-actions02.yml +++ b/.github/workflows/marshalldaniel-c05-actions02.yml @@ -12,15 +12,15 @@ jobs: uses: actions/checkout@v1 - name: login docker hub - working-directory: marshalldaniel/c05-actions-02/ + working-directory: marshalldaniel/c05-actions02/ run: make login_dockerhub - name: build docker image - working-directory: marshalldaniel/c05-actions-02/ + working-directory: marshalldaniel/c05-actions02/ run: make build_image - name: push docker image - working-directory: marshalldaniel/c05-actions-02/ + working-directory: marshalldaniel/c05-actions02/ run: make push_image - name: Comment PR From 661a9645d65c381d03ec754695ad8f3b7c00a41e Mon Sep 17 00:00:00 2001 From: Daniel Marshall Date: Thu, 17 Feb 2022 12:10:52 +1100 Subject: [PATCH 09/34] marshalldaniel/c05-actions02 --- marshalldaniel/c05-actions02/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/marshalldaniel/c05-actions02/Makefile b/marshalldaniel/c05-actions02/Makefile index b516455..58213e4 100644 --- a/marshalldaniel/c05-actions02/Makefile +++ b/marshalldaniel/c05-actions02/Makefile @@ -11,7 +11,7 @@ build_image: .PHONY: login_dockerhub login_dockerhub: - @echo ${MARSHALLDANIEL_DH_TOKEN} | docker login -u ${MARSHALLDANIEL_DH_NAME} --password-stdin + @printf ${MARSHALLDANIEL_DH_TOKEN} | docker login -u ${MARSHALLDANIEL_DH_NAME} --password-stdin .PHONY: push_image push_image: From b49ba9e7b9b5c720f3aa6823453faef214d9c5cf Mon Sep 17 00:00:00 2001 From: Daniel Marshall Date: Thu, 17 Feb 2022 12:13:07 +1100 Subject: [PATCH 10/34] marshalldaniel/c05-actions02 --- marshalldaniel/c05-actions02/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/marshalldaniel/c05-actions02/Makefile b/marshalldaniel/c05-actions02/Makefile index 58213e4..69dd9ef 100644 --- a/marshalldaniel/c05-actions02/Makefile +++ b/marshalldaniel/c05-actions02/Makefile @@ -11,7 +11,7 @@ build_image: .PHONY: login_dockerhub login_dockerhub: - @printf ${MARSHALLDANIEL_DH_TOKEN} | docker login -u ${MARSHALLDANIEL_DH_NAME} --password-stdin + @printf ${{ MARSHALLDANIEL_DH_TOKEN }} | docker login -u ${{ MARSHALLDANIEL_DH_NAME}} --password-stdin .PHONY: push_image push_image: From 8f4356fd02fd619184c25bd84b863af80892af39 Mon Sep 17 00:00:00 2001 From: Daniel Marshall Date: Thu, 17 Feb 2022 12:14:31 +1100 Subject: [PATCH 11/34] marshalldaniel/c05-actions02 --- marshalldaniel/c05-actions02/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/marshalldaniel/c05-actions02/Makefile b/marshalldaniel/c05-actions02/Makefile index 69dd9ef..7109199 100644 --- a/marshalldaniel/c05-actions02/Makefile +++ b/marshalldaniel/c05-actions02/Makefile @@ -11,7 +11,7 @@ build_image: .PHONY: login_dockerhub login_dockerhub: - @printf ${{ MARSHALLDANIEL_DH_TOKEN }} | docker login -u ${{ MARSHALLDANIEL_DH_NAME}} --password-stdin + @echo ${{ MARSHALLDANIEL_DH_TOKEN }} | docker login -u ${{ MARSHALLDANIEL_DH_NAME}} --password-stdin .PHONY: push_image push_image: From 60016383f73d29e4f907f5a085d7b4b98d269bbf Mon Sep 17 00:00:00 2001 From: Daniel Marshall Date: Thu, 17 Feb 2022 12:21:15 +1100 Subject: [PATCH 12/34] marshalldaniel/c05-actions02 --- marshalldaniel/c05-actions02/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/marshalldaniel/c05-actions02/Makefile b/marshalldaniel/c05-actions02/Makefile index 7109199..e857e5f 100644 --- a/marshalldaniel/c05-actions02/Makefile +++ b/marshalldaniel/c05-actions02/Makefile @@ -11,7 +11,7 @@ build_image: .PHONY: login_dockerhub login_dockerhub: - @echo ${{ MARSHALLDANIEL_DH_TOKEN }} | docker login -u ${{ MARSHALLDANIEL_DH_NAME}} --password-stdin + @echo ${{ MARSHALLDANIEL_DH_TOKEN }} | docker login -u ${{ MARSHALLDANIEL_DH_NAME }} --password-stdin .PHONY: push_image push_image: From ae6b1164b9cb6dc28b8e509f43e871076210d30c Mon Sep 17 00:00:00 2001 From: Daniel Marshall Date: Thu, 17 Feb 2022 12:22:06 +1100 Subject: [PATCH 13/34] marshalldaniel/c05-actions02 --- marshalldaniel/c05-actions02/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/marshalldaniel/c05-actions02/Makefile b/marshalldaniel/c05-actions02/Makefile index e857e5f..aeff331 100644 --- a/marshalldaniel/c05-actions02/Makefile +++ b/marshalldaniel/c05-actions02/Makefile @@ -11,7 +11,7 @@ build_image: .PHONY: login_dockerhub login_dockerhub: - @echo ${{ MARSHALLDANIEL_DH_TOKEN }} | docker login -u ${{ MARSHALLDANIEL_DH_NAME }} --password-stdin + @echo ${ MARSHALLDANIEL_DH_TOKEN } | docker login -u ${ MARSHALLDANIEL_DH_NAME } --password-stdin .PHONY: push_image push_image: From c347bd1cddfdb2131cd6cb096cac078c79078095 Mon Sep 17 00:00:00 2001 From: Daniel Marshall Date: Thu, 17 Feb 2022 12:28:29 +1100 Subject: [PATCH 14/34] marshalldaniel/c05-actions02 --- .github/workflows/marshalldaniel-c05-actions02.yml | 3 +++ marshalldaniel/c05-actions02/Makefile | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/workflows/marshalldaniel-c05-actions02.yml b/.github/workflows/marshalldaniel-c05-actions02.yml index 04cbd8e..cc550ed 100644 --- a/.github/workflows/marshalldaniel-c05-actions02.yml +++ b/.github/workflows/marshalldaniel-c05-actions02.yml @@ -12,6 +12,9 @@ jobs: uses: actions/checkout@v1 - name: login docker hub + env: + MARSHALLDANIEL_DH_TOKEN: ${{ secrets.MARSHALLDANIEL_DH_TOKEN }} + MARSHALLDANIEL_DH_NAME: ${{ secrets.MARSHALLDANIEL_DH_NAME }} working-directory: marshalldaniel/c05-actions02/ run: make login_dockerhub diff --git a/marshalldaniel/c05-actions02/Makefile b/marshalldaniel/c05-actions02/Makefile index aeff331..fef0810 100644 --- a/marshalldaniel/c05-actions02/Makefile +++ b/marshalldaniel/c05-actions02/Makefile @@ -11,7 +11,7 @@ build_image: .PHONY: login_dockerhub login_dockerhub: - @echo ${ MARSHALLDANIEL_DH_TOKEN } | docker login -u ${ MARSHALLDANIEL_DH_NAME } --password-stdin + @echo $(MARSHALLDANIEL_DH_TOKEN) | docker login -u $(MARSHALLDANIEL_DH_NAME) --password-stdin .PHONY: push_image push_image: From 73fec42778e65ec82b88f01277dac33d2bb0a483 Mon Sep 17 00:00:00 2001 From: Daniel Marshall Date: Thu, 17 Feb 2022 12:36:52 +1100 Subject: [PATCH 15/34] marshalldaniel/c05-actions02 --- marshalldaniel/c05-actions02/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/marshalldaniel/c05-actions02/Makefile b/marshalldaniel/c05-actions02/Makefile index fef0810..23ac0fa 100644 --- a/marshalldaniel/c05-actions02/Makefile +++ b/marshalldaniel/c05-actions02/Makefile @@ -1,5 +1,5 @@ export SHORT_COMMIT_SHA = $(shell git rev-parse --short HEAD) -export IMAGE_NAME = $(shell git rev-parse --abbrev-ref HEAD) +export IMAGE_NAME = "marshalldaniel/c05-actions02" DOCKER_COMPOSE = docker-compose build DOCKERHUB_PUSH = docker push $(IMAGE_NAME):$(SHORT_COMMIT_SHA) From f4ac4e67f74f6c53e379d8c7ede20695b255984f Mon Sep 17 00:00:00 2001 From: Daniel Marshall Date: Thu, 17 Feb 2022 12:38:16 +1100 Subject: [PATCH 16/34] marshalldaniel/c05-actions02 --- marshalldaniel/c05-actions02/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/marshalldaniel/c05-actions02/Makefile b/marshalldaniel/c05-actions02/Makefile index 23ac0fa..c79cd21 100644 --- a/marshalldaniel/c05-actions02/Makefile +++ b/marshalldaniel/c05-actions02/Makefile @@ -1,5 +1,5 @@ export SHORT_COMMIT_SHA = $(shell git rev-parse --short HEAD) -export IMAGE_NAME = "marshalldaniel/c05-actions02" +export IMAGE_NAME = marshalldaniel/c05-actions02 DOCKER_COMPOSE = docker-compose build DOCKERHUB_PUSH = docker push $(IMAGE_NAME):$(SHORT_COMMIT_SHA) From ed1c2ca16072dcf82bc9afa81e2d0a04f050948d Mon Sep 17 00:00:00 2001 From: Daniel Marshall Date: Thu, 17 Feb 2022 12:42:57 +1100 Subject: [PATCH 17/34] marshalldaniel/c05-actions02 --- .github/workflows/marshalldaniel-c05-actions02.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/marshalldaniel-c05-actions02.yml b/.github/workflows/marshalldaniel-c05-actions02.yml index cc550ed..bdcb6c5 100644 --- a/.github/workflows/marshalldaniel-c05-actions02.yml +++ b/.github/workflows/marshalldaniel-c05-actions02.yml @@ -28,7 +28,6 @@ jobs: - name: Comment PR uses: thollander/actions-comment-pull-request@v1 - with: - message: 'Image name ${{ env.IMAGE_NAME}} has been pushed to dockerhub' + message: 'Image name ${{ env.IMAGE_NAME }}:${{ env.SHORT_COMMIT_SHA }} has been pushed to dockerhub' GITHUB_TOKEN: ${{ secrets.MARSHALLDANIEL_GHKEY }} From d2efb3bf0020b043af613adddd8a10ad3aac8343 Mon Sep 17 00:00:00 2001 From: Daniel Marshall Date: Thu, 17 Feb 2022 12:47:34 +1100 Subject: [PATCH 18/34] marshalldaniel/c05-actions02 --- marshalldaniel/c05-actions02/Makefile | 2 ++ 1 file changed, 2 insertions(+) diff --git a/marshalldaniel/c05-actions02/Makefile b/marshalldaniel/c05-actions02/Makefile index c79cd21..ba1cdfd 100644 --- a/marshalldaniel/c05-actions02/Makefile +++ b/marshalldaniel/c05-actions02/Makefile @@ -16,3 +16,5 @@ login_dockerhub: .PHONY: push_image push_image: $(DOCKERHUB_PUSH) + echo $(IMAGE_NAME) >> $(GITHUB_ENV) + echo $(SHORT_COMMIT_SHA) >> $(GITHUB_ENV) \ No newline at end of file From 2b041de33e578e10ad2b8cca96d1945c937e191e Mon Sep 17 00:00:00 2001 From: Daniel Marshall Date: Thu, 17 Feb 2022 12:50:24 +1100 Subject: [PATCH 19/34] marshalldaniel/c05-actions02 --- marshalldaniel/c05-actions02/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/marshalldaniel/c05-actions02/Makefile b/marshalldaniel/c05-actions02/Makefile index ba1cdfd..0a28555 100644 --- a/marshalldaniel/c05-actions02/Makefile +++ b/marshalldaniel/c05-actions02/Makefile @@ -1,5 +1,5 @@ export SHORT_COMMIT_SHA = $(shell git rev-parse --short HEAD) -export IMAGE_NAME = marshalldaniel/c05-actions02 +export IMAGE_NAME = "marshalldaniel/c05-actions02" DOCKER_COMPOSE = docker-compose build DOCKERHUB_PUSH = docker push $(IMAGE_NAME):$(SHORT_COMMIT_SHA) From 92a71a032f95b4e2bc1ede9ec024efa5596ab144 Mon Sep 17 00:00:00 2001 From: Daniel Marshall Date: Thu, 17 Feb 2022 12:57:29 +1100 Subject: [PATCH 20/34] marshalldaniel/c05-actions02 --- marshalldaniel/c05-actions02/Makefile | 6 +++--- marshalldaniel/c05-actions02/docker-compose.yaml | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/marshalldaniel/c05-actions02/Makefile b/marshalldaniel/c05-actions02/Makefile index 0a28555..1d1aa17 100644 --- a/marshalldaniel/c05-actions02/Makefile +++ b/marshalldaniel/c05-actions02/Makefile @@ -1,5 +1,6 @@ export SHORT_COMMIT_SHA = $(shell git rev-parse --short HEAD) -export IMAGE_NAME = "marshalldaniel/c05-actions02" +export IMAGE_NAME = marshalldaniel/c05-actions02 +export FULL_IMAGE_NAME = $(IMAGE_NAME):$(SHORT_COMMIT_SHA) DOCKER_COMPOSE = docker-compose build DOCKERHUB_PUSH = docker push $(IMAGE_NAME):$(SHORT_COMMIT_SHA) @@ -16,5 +17,4 @@ login_dockerhub: .PHONY: push_image push_image: $(DOCKERHUB_PUSH) - echo $(IMAGE_NAME) >> $(GITHUB_ENV) - echo $(SHORT_COMMIT_SHA) >> $(GITHUB_ENV) \ No newline at end of file + echo $(FULL_IMAGE_NAME) >> $(GITHUB_ENV) \ No newline at end of file diff --git a/marshalldaniel/c05-actions02/docker-compose.yaml b/marshalldaniel/c05-actions02/docker-compose.yaml index d2c8947..a8b3583 100644 --- a/marshalldaniel/c05-actions02/docker-compose.yaml +++ b/marshalldaniel/c05-actions02/docker-compose.yaml @@ -1,5 +1,5 @@ version: '3.8' services: web: - image: ${IMAGE_NAME}:${SHORT_COMMIT_SHA} + image: ${FULL_IMAGE_NAME} build: . \ No newline at end of file From 2c717756a6d64a71f072b4c8a09206d1f2e98ad6 Mon Sep 17 00:00:00 2001 From: Daniel Marshall Date: Thu, 17 Feb 2022 16:36:09 +1100 Subject: [PATCH 21/34] arshalldaniel/c05-actions02 --- marshalldaniel/c05-actions02/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/marshalldaniel/c05-actions02/Makefile b/marshalldaniel/c05-actions02/Makefile index 1d1aa17..1097e7f 100644 --- a/marshalldaniel/c05-actions02/Makefile +++ b/marshalldaniel/c05-actions02/Makefile @@ -1,5 +1,5 @@ export SHORT_COMMIT_SHA = $(shell git rev-parse --short HEAD) -export IMAGE_NAME = marshalldaniel/c05-actions02 +export IMAGE_NAME = 'marshalldaniel/c05-actions02' export FULL_IMAGE_NAME = $(IMAGE_NAME):$(SHORT_COMMIT_SHA) DOCKER_COMPOSE = docker-compose build DOCKERHUB_PUSH = docker push $(IMAGE_NAME):$(SHORT_COMMIT_SHA) From 57a378e5ca4644d37114201e306a5b7edd0a991b Mon Sep 17 00:00:00 2001 From: Daniel Marshall Date: Thu, 17 Feb 2022 16:40:31 +1100 Subject: [PATCH 22/34] arshalldaniel/c05-actions02 --- marshalldaniel/c05-actions02/Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/marshalldaniel/c05-actions02/Makefile b/marshalldaniel/c05-actions02/Makefile index 1097e7f..a571111 100644 --- a/marshalldaniel/c05-actions02/Makefile +++ b/marshalldaniel/c05-actions02/Makefile @@ -1,6 +1,6 @@ export SHORT_COMMIT_SHA = $(shell git rev-parse --short HEAD) -export IMAGE_NAME = 'marshalldaniel/c05-actions02' -export FULL_IMAGE_NAME = $(IMAGE_NAME):$(SHORT_COMMIT_SHA) +export IMAGE_NAME = marshalldaniel/c05-actions02 +export FULL_IMAGE_NAME = "$(IMAGE_NAME):$(SHORT_COMMIT_SHA)" DOCKER_COMPOSE = docker-compose build DOCKERHUB_PUSH = docker push $(IMAGE_NAME):$(SHORT_COMMIT_SHA) From 1d3c35c4201a09fe9439771a2569a676e086c3a8 Mon Sep 17 00:00:00 2001 From: Daniel Marshall Date: Thu, 17 Feb 2022 16:42:59 +1100 Subject: [PATCH 23/34] arshalldaniel/c05-actions02 --- marshalldaniel/c05-actions02/docker-compose.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/marshalldaniel/c05-actions02/docker-compose.yaml b/marshalldaniel/c05-actions02/docker-compose.yaml index a8b3583..d2c8947 100644 --- a/marshalldaniel/c05-actions02/docker-compose.yaml +++ b/marshalldaniel/c05-actions02/docker-compose.yaml @@ -1,5 +1,5 @@ version: '3.8' services: web: - image: ${FULL_IMAGE_NAME} + image: ${IMAGE_NAME}:${SHORT_COMMIT_SHA} build: . \ No newline at end of file From 8d2610c3abe43960a3246c03db4b27f9203367ae Mon Sep 17 00:00:00 2001 From: Daniel Marshall Date: Thu, 17 Feb 2022 16:50:56 +1100 Subject: [PATCH 24/34] marshalldaniel/c05-actions02 --- marshalldaniel/c05-actions02/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/marshalldaniel/c05-actions02/Makefile b/marshalldaniel/c05-actions02/Makefile index a571111..b1da502 100644 --- a/marshalldaniel/c05-actions02/Makefile +++ b/marshalldaniel/c05-actions02/Makefile @@ -17,4 +17,4 @@ login_dockerhub: .PHONY: push_image push_image: $(DOCKERHUB_PUSH) - echo $(FULL_IMAGE_NAME) >> $(GITHUB_ENV) \ No newline at end of file + echo $(IMAGE_NAME):$(SHORT_COMMIT_SHA) >> $(GITHUB_ENV) \ No newline at end of file From 02522908a0fc2b66f2fef82614cac77d1677398e Mon Sep 17 00:00:00 2001 From: Daniel Marshall Date: Thu, 17 Feb 2022 16:55:09 +1100 Subject: [PATCH 25/34] marshalldaniel/c05-actions02 --- .github/workflows/marshalldaniel-c05-actions02.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/marshalldaniel-c05-actions02.yml b/.github/workflows/marshalldaniel-c05-actions02.yml index bdcb6c5..70f1c42 100644 --- a/.github/workflows/marshalldaniel-c05-actions02.yml +++ b/.github/workflows/marshalldaniel-c05-actions02.yml @@ -23,11 +23,12 @@ jobs: run: make build_image - name: push docker image + id: push_image_id working-directory: marshalldaniel/c05-actions02/ run: make push_image - name: Comment PR uses: thollander/actions-comment-pull-request@v1 with: - message: 'Image name ${{ env.IMAGE_NAME }}:${{ env.SHORT_COMMIT_SHA }} has been pushed to dockerhub' + message: 'Image name ${{ steps.push_image_id.outputs.IMAGE_NAME }}:${{ env.SHORT_COMMIT_SHA }} has been pushed to dockerhub' GITHUB_TOKEN: ${{ secrets.MARSHALLDANIEL_GHKEY }} From a5a61c6e9a4cfc0de3cf46b35832c3c4589e76fc Mon Sep 17 00:00:00 2001 From: Daniel Marshall Date: Thu, 17 Feb 2022 17:00:22 +1100 Subject: [PATCH 26/34] marshalldaniel/c05-actions02 --- marshalldaniel/c05-actions02/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/marshalldaniel/c05-actions02/Makefile b/marshalldaniel/c05-actions02/Makefile index b1da502..1145ddc 100644 --- a/marshalldaniel/c05-actions02/Makefile +++ b/marshalldaniel/c05-actions02/Makefile @@ -17,4 +17,4 @@ login_dockerhub: .PHONY: push_image push_image: $(DOCKERHUB_PUSH) - echo $(IMAGE_NAME):$(SHORT_COMMIT_SHA) >> $(GITHUB_ENV) \ No newline at end of file + echo '$(IMAGE_NAME):$(SHORT_COMMIT_SHA)' >> $(GITHUB_ENV) \ No newline at end of file From 23dd434bebfef30136065fde11afb2e11e9545a4 Mon Sep 17 00:00:00 2001 From: Daniel Marshall Date: Thu, 17 Feb 2022 17:15:03 +1100 Subject: [PATCH 27/34] marshalldaniel/c05-actions02 --- marshalldaniel/c05-actions02/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/marshalldaniel/c05-actions02/Makefile b/marshalldaniel/c05-actions02/Makefile index 1145ddc..cd20a85 100644 --- a/marshalldaniel/c05-actions02/Makefile +++ b/marshalldaniel/c05-actions02/Makefile @@ -17,4 +17,4 @@ login_dockerhub: .PHONY: push_image push_image: $(DOCKERHUB_PUSH) - echo '$(IMAGE_NAME):$(SHORT_COMMIT_SHA)' >> $(GITHUB_ENV) \ No newline at end of file + @echo $(IMAGE_NAME):$(SHORT_COMMIT_SHA) >> $(GITHUB_ENV) \ No newline at end of file From c470b35f3a978682e5d5c35239e22bacdd6f7aaf Mon Sep 17 00:00:00 2001 From: Daniel Marshall Date: Thu, 17 Feb 2022 17:21:48 +1100 Subject: [PATCH 28/34] marshalldaniel/c05-actions02 --- .github/workflows/marshalldaniel-c05-actions02.yml | 2 +- marshalldaniel/c05-actions02/Makefile | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/marshalldaniel-c05-actions02.yml b/.github/workflows/marshalldaniel-c05-actions02.yml index 70f1c42..b594f8c 100644 --- a/.github/workflows/marshalldaniel-c05-actions02.yml +++ b/.github/workflows/marshalldaniel-c05-actions02.yml @@ -30,5 +30,5 @@ jobs: - name: Comment PR uses: thollander/actions-comment-pull-request@v1 with: - message: 'Image name ${{ steps.push_image_id.outputs.IMAGE_NAME }}:${{ env.SHORT_COMMIT_SHA }} has been pushed to dockerhub' + message: 'Image name ${{ env.FULL_IMAGE_ID }} has been pushed to dockerhub' GITHUB_TOKEN: ${{ secrets.MARSHALLDANIEL_GHKEY }} diff --git a/marshalldaniel/c05-actions02/Makefile b/marshalldaniel/c05-actions02/Makefile index cd20a85..f7edf16 100644 --- a/marshalldaniel/c05-actions02/Makefile +++ b/marshalldaniel/c05-actions02/Makefile @@ -17,4 +17,4 @@ login_dockerhub: .PHONY: push_image push_image: $(DOCKERHUB_PUSH) - @echo $(IMAGE_NAME):$(SHORT_COMMIT_SHA) >> $(GITHUB_ENV) \ No newline at end of file + @echo "{FULL_IMAGE_ID}={$(IMAGE_NAME):$(SHORT_COMMIT_SHA)}" >> $(GITHUB_ENV) \ No newline at end of file From 009fa1be617c67ed11b23892dfaa9ee7d64b093b Mon Sep 17 00:00:00 2001 From: Daniel Marshall Date: Thu, 17 Feb 2022 17:30:10 +1100 Subject: [PATCH 29/34] marshalldaniel/c05-actions02 --- .github/workflows/marshalldaniel-c05-actions02.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/marshalldaniel-c05-actions02.yml b/.github/workflows/marshalldaniel-c05-actions02.yml index b594f8c..80576c5 100644 --- a/.github/workflows/marshalldaniel-c05-actions02.yml +++ b/.github/workflows/marshalldaniel-c05-actions02.yml @@ -30,5 +30,5 @@ jobs: - name: Comment PR uses: thollander/actions-comment-pull-request@v1 with: - message: 'Image name ${{ env.FULL_IMAGE_ID }} has been pushed to dockerhub' + message: 'Image name $FULL_IMAGE_ID has been pushed to dockerhub' GITHUB_TOKEN: ${{ secrets.MARSHALLDANIEL_GHKEY }} From 739ccd99dffb65f83282ca12cc6e60a635aba32e Mon Sep 17 00:00:00 2001 From: Daniel Marshall Date: Fri, 18 Feb 2022 11:01:25 +1100 Subject: [PATCH 30/34] marshalldaniel/c05-actions02 --- marshalldaniel/c05-actions02/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/marshalldaniel/c05-actions02/Makefile b/marshalldaniel/c05-actions02/Makefile index f7edf16..aa491f5 100644 --- a/marshalldaniel/c05-actions02/Makefile +++ b/marshalldaniel/c05-actions02/Makefile @@ -17,4 +17,4 @@ login_dockerhub: .PHONY: push_image push_image: $(DOCKERHUB_PUSH) - @echo "{FULL_IMAGE_ID}={$(IMAGE_NAME):$(SHORT_COMMIT_SHA)}" >> $(GITHUB_ENV) \ No newline at end of file + echo "{FULL_IMAGE_ID}={$(IMAGE_NAME):$(SHORT_COMMIT_SHA)}" >> $(GITHUB_ENV) \ No newline at end of file From e0b5097e407eb4b2577af32b6bd6dfd1b7fa79bc Mon Sep 17 00:00:00 2001 From: Daniel Marshall Date: Fri, 18 Feb 2022 11:04:01 +1100 Subject: [PATCH 31/34] marshalldaniel/c05-actions02 --- .github/workflows/marshalldaniel-c05-actions02.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/marshalldaniel-c05-actions02.yml b/.github/workflows/marshalldaniel-c05-actions02.yml index 80576c5..062a51a 100644 --- a/.github/workflows/marshalldaniel-c05-actions02.yml +++ b/.github/workflows/marshalldaniel-c05-actions02.yml @@ -30,5 +30,5 @@ jobs: - name: Comment PR uses: thollander/actions-comment-pull-request@v1 with: - message: 'Image name $FULL_IMAGE_ID has been pushed to dockerhub' + message: 'Image name ${{ FULL_IMAGE_ID }} has been pushed to dockerhub' GITHUB_TOKEN: ${{ secrets.MARSHALLDANIEL_GHKEY }} From 68a560b8e885ad9017986fe753dc11babc80433f Mon Sep 17 00:00:00 2001 From: Daniel Marshall Date: Fri, 18 Feb 2022 11:06:55 +1100 Subject: [PATCH 32/34] marshalldaniel/c05-actions02 --- .github/workflows/marshalldaniel-c05-actions02.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/marshalldaniel-c05-actions02.yml b/.github/workflows/marshalldaniel-c05-actions02.yml index 062a51a..b594f8c 100644 --- a/.github/workflows/marshalldaniel-c05-actions02.yml +++ b/.github/workflows/marshalldaniel-c05-actions02.yml @@ -30,5 +30,5 @@ jobs: - name: Comment PR uses: thollander/actions-comment-pull-request@v1 with: - message: 'Image name ${{ FULL_IMAGE_ID }} has been pushed to dockerhub' + message: 'Image name ${{ env.FULL_IMAGE_ID }} has been pushed to dockerhub' GITHUB_TOKEN: ${{ secrets.MARSHALLDANIEL_GHKEY }} From d7ce63deb35b0ca6657b317a60e97e86ba2530e4 Mon Sep 17 00:00:00 2001 From: Daniel Marshall Date: Fri, 18 Feb 2022 11:13:30 +1100 Subject: [PATCH 33/34] marshalldaniel/c05-actions02 --- .github/workflows/marshalldaniel-c05-actions02.yml | 2 +- marshalldaniel/c05-actions02/Makefile | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/marshalldaniel-c05-actions02.yml b/.github/workflows/marshalldaniel-c05-actions02.yml index b594f8c..adb2659 100644 --- a/.github/workflows/marshalldaniel-c05-actions02.yml +++ b/.github/workflows/marshalldaniel-c05-actions02.yml @@ -30,5 +30,5 @@ jobs: - name: Comment PR uses: thollander/actions-comment-pull-request@v1 with: - message: 'Image name ${{ env.FULL_IMAGE_ID }} has been pushed to dockerhub' + message: 'Image name ${{ steps.push_image.outputs.full_image_id }} has been pushed to dockerhub' GITHUB_TOKEN: ${{ secrets.MARSHALLDANIEL_GHKEY }} diff --git a/marshalldaniel/c05-actions02/Makefile b/marshalldaniel/c05-actions02/Makefile index aa491f5..e06e985 100644 --- a/marshalldaniel/c05-actions02/Makefile +++ b/marshalldaniel/c05-actions02/Makefile @@ -17,4 +17,4 @@ login_dockerhub: .PHONY: push_image push_image: $(DOCKERHUB_PUSH) - echo "{FULL_IMAGE_ID}={$(IMAGE_NAME):$(SHORT_COMMIT_SHA)}" >> $(GITHUB_ENV) \ No newline at end of file + @echo "::set-output name=full_image_id::$(FULL_IMAGE_NAME)" \ No newline at end of file From 4a1ae257d46940c3b35f2e308c75315ae9fec78c Mon Sep 17 00:00:00 2001 From: Daniel Marshall Date: Fri, 18 Feb 2022 11:20:11 +1100 Subject: [PATCH 34/34] marshalldaniel/c05-actions02 --- .github/workflows/marshalldaniel-c05-actions02.yml | 2 +- marshalldaniel/c05-actions02/Makefile | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/marshalldaniel-c05-actions02.yml b/.github/workflows/marshalldaniel-c05-actions02.yml index adb2659..f1c41b0 100644 --- a/.github/workflows/marshalldaniel-c05-actions02.yml +++ b/.github/workflows/marshalldaniel-c05-actions02.yml @@ -30,5 +30,5 @@ jobs: - name: Comment PR uses: thollander/actions-comment-pull-request@v1 with: - message: 'Image name ${{ steps.push_image.outputs.full_image_id }} has been pushed to dockerhub' + message: 'Image name ${{ env.FULLIMAGEID }} has been pushed to dockerhub' GITHUB_TOKEN: ${{ secrets.MARSHALLDANIEL_GHKEY }} diff --git a/marshalldaniel/c05-actions02/Makefile b/marshalldaniel/c05-actions02/Makefile index e06e985..2c8ae76 100644 --- a/marshalldaniel/c05-actions02/Makefile +++ b/marshalldaniel/c05-actions02/Makefile @@ -17,4 +17,4 @@ login_dockerhub: .PHONY: push_image push_image: $(DOCKERHUB_PUSH) - @echo "::set-output name=full_image_id::$(FULL_IMAGE_NAME)" \ No newline at end of file + echo "FULLIMAGEID=$(IMAGE_NAME):$(SHORT_COMMIT_SHA)" >> $(GITHUB_ENV) \ No newline at end of file