From 65425f820cb81024c62385c2e8430648433a209c Mon Sep 17 00:00:00 2001 From: "David H." <22520563+NewJerseyStyle@users.noreply.github.com> Date: Wed, 9 Oct 2024 18:03:13 -0400 Subject: [PATCH 1/5] Update release-docker-images.yml --- .github/workflows/release-docker-images.yml | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/.github/workflows/release-docker-images.yml b/.github/workflows/release-docker-images.yml index 08465f6c3..610283da8 100644 --- a/.github/workflows/release-docker-images.yml +++ b/.github/workflows/release-docker-images.yml @@ -33,13 +33,14 @@ jobs: - name: Login to Docker Hub uses: docker/login-action@v3 with: - username: ${{ secrets.DOCKER_USERNAME }} - password: ${{ secrets.DOCKER_TOKEN }} + registry: ghcr.io + username: ${{ github.actor }} + password: ${{ secrets.CR_PAT }} - name: Build full project via docker-compose run: | mv example.env .env - sed -i 's/compdem/${{ secrets.DOCKER_USERNAME }}/g' docker-compose.yml + sed -i 's/compdem/${GITHUB_USERNAME}/g' docker-compose.yml docker compose build --parallel --build-arg GIT_HASH=${GITHUB_SHA:0:6} - name: Push images to Docker Hub From 882cf6e6d19c1287dca0b850d66a18043ff80ed1 Mon Sep 17 00:00:00 2001 From: "David H." <22520563+NewJerseyStyle@users.noreply.github.com> Date: Wed, 9 Oct 2024 18:06:09 -0400 Subject: [PATCH 2/5] Update release-docker-images.yml --- .github/workflows/release-docker-images.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/release-docker-images.yml b/.github/workflows/release-docker-images.yml index 610283da8..68e0c03b4 100644 --- a/.github/workflows/release-docker-images.yml +++ b/.github/workflows/release-docker-images.yml @@ -40,7 +40,7 @@ jobs: - name: Build full project via docker-compose run: | mv example.env .env - sed -i 's/compdem/${GITHUB_USERNAME}/g' docker-compose.yml + sed -i 's/compdem/civictech/g' docker-compose.yml docker compose build --parallel --build-arg GIT_HASH=${GITHUB_SHA:0:6} - name: Push images to Docker Hub From 025832d36b4b9d476ae0452b804770dd7739687f Mon Sep 17 00:00:00 2001 From: "David H." <22520563+NewJerseyStyle@users.noreply.github.com> Date: Wed, 9 Oct 2024 18:21:48 -0400 Subject: [PATCH 3/5] Update naming for GHCR based on tutorial https://medium.com/@deepak1812002/get-started-with-github-ghcr-an-alternative-of-dockerhub-f7d5b2198b9a --- .github/workflows/release-docker-images.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/release-docker-images.yml b/.github/workflows/release-docker-images.yml index 68e0c03b4..5f2acc23f 100644 --- a/.github/workflows/release-docker-images.yml +++ b/.github/workflows/release-docker-images.yml @@ -40,7 +40,7 @@ jobs: - name: Build full project via docker-compose run: | mv example.env .env - sed -i 's/compdem/civictech/g' docker-compose.yml + sed -i 's/compdem/CivicTechTO/g' docker-compose.yml docker compose build --parallel --build-arg GIT_HASH=${GITHUB_SHA:0:6} - name: Push images to Docker Hub From 840e8f027bd613c9d1e13f75f81b2ea232af3c06 Mon Sep 17 00:00:00 2001 From: "David H." <22520563+NewJerseyStyle@users.noreply.github.com> Date: Wed, 9 Oct 2024 18:27:54 -0400 Subject: [PATCH 4/5] Update replace image name prefix `docker.io` with `ghcr.io` --- .github/workflows/release-docker-images.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/release-docker-images.yml b/.github/workflows/release-docker-images.yml index 5f2acc23f..fa6ee1d82 100644 --- a/.github/workflows/release-docker-images.yml +++ b/.github/workflows/release-docker-images.yml @@ -40,6 +40,7 @@ jobs: - name: Build full project via docker-compose run: | mv example.env .env + sed -i 's/docker.io/ghcr.io/g' docker-compose.yml sed -i 's/compdem/CivicTechTO/g' docker-compose.yml docker compose build --parallel --build-arg GIT_HASH=${GITHUB_SHA:0:6} From c40254a877f73c234128d30eeaa051b62957fc53 Mon Sep 17 00:00:00 2001 From: "David H." <22520563+NewJerseyStyle@users.noreply.github.com> Date: Wed, 9 Oct 2024 18:28:45 -0400 Subject: [PATCH 5/5] Update release-docker-images.yml --- .github/workflows/release-docker-images.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/release-docker-images.yml b/.github/workflows/release-docker-images.yml index fa6ee1d82..64ff66065 100644 --- a/.github/workflows/release-docker-images.yml +++ b/.github/workflows/release-docker-images.yml @@ -41,7 +41,7 @@ jobs: run: | mv example.env .env sed -i 's/docker.io/ghcr.io/g' docker-compose.yml - sed -i 's/compdem/CivicTechTO/g' docker-compose.yml + sed -i 's/compdem/civictechto/g' docker-compose.yml docker compose build --parallel --build-arg GIT_HASH=${GITHUB_SHA:0:6} - name: Push images to Docker Hub