From 40636eb0653d41569050a635dc79777d195ebf13 Mon Sep 17 00:00:00 2001 From: Praveen Date: Tue, 8 Oct 2024 17:51:38 +0530 Subject: [PATCH 1/6] Pushing the backup image into ghcr.io --- .github/workflows/ci.yml | 31 ++++++++++++++++++++++++++----- 1 file changed, 26 insertions(+), 5 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 35b74c3..c269f93 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -2,6 +2,8 @@ name: Continuous Integration on: push: + branches: ['master','main'] # Trigger on the pushes to master & main branches + tags: [ '[0-9]+.[0-9]+.[0-9]+' ] jobs: test: @@ -18,19 +20,35 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - + + # Step to login to DockerHub - name: Log in to Docker Hub uses: docker/login-action@v3 with: - username: ${{ secrets.DOCKERHUB_USERNAME }} - password: ${{ secrets.DOCKERHUB_TOKEN }} - + username: ${{ secrets.DOCKERHUB_USERNAME}} + password: ${{ secrets.DOCKERHUB_TOKEN}} + + # Step to login to GitHub Container Registry + - name: Log in to GHCR + uses: docker/login-action@v3 + with: + registry: ghcr.io + username: ${{ github.actor}} + password: ${{ secrets.GITHUB_TOKEN}} + + # Extract metadata for the Docker images using the semver - name: Extract metadata (tags, labels) for Docker id: meta uses: docker/metadata-action@v5 with: - images: ${{ vars.DOCKER_ORG }}/ecs-deploy + images: | + ${{ vars.DOCKER_ORG }}/ecs-deploy # the name needs to be static "ecs-deploy" + ghcr.io/${{ github.repository_owner }}/ecs-deploy + tags: | + type=semver,pattern={{version}} + + # Build and push Docker image to GHCR and Docker Hub - name: Build and push Docker image uses: docker/build-push-action@v5 with: @@ -38,3 +56,6 @@ jobs: push: true tags: ${{ steps.meta.outputs.tags }} labels: ${{ steps.meta.outputs.labels }} + + + \ No newline at end of file From 726eef6a167a0d54b49160c94ec4cd342783d0aa Mon Sep 17 00:00:00 2001 From: Praveen Date: Wed, 9 Oct 2024 12:09:01 +0530 Subject: [PATCH 2/6] Pushing the ecs deploy --- .github/workflows/ci.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index c269f93..f349eda 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -56,6 +56,7 @@ jobs: push: true tags: ${{ steps.meta.outputs.tags }} labels: ${{ steps.meta.outputs.labels }} + #adding a line \ No newline at end of file From da085a4698bca7a1d875001e130d701d76d45a64 Mon Sep 17 00:00:00 2001 From: Praveen Date: Wed, 9 Oct 2024 18:22:04 +0530 Subject: [PATCH 3/6] Pushing the ecs deploy --- .github/workflows/ci.yml | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index f349eda..448215e 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -55,8 +55,5 @@ jobs: context: . push: true tags: ${{ steps.meta.outputs.tags }} - labels: ${{ steps.meta.outputs.labels }} - #adding a line - - - \ No newline at end of file + labels: ${{ steps.meta.outputs.labels }} + \ No newline at end of file From 037be125c85919cfe6ae4b958166ff03d0904f3d Mon Sep 17 00:00:00 2001 From: Praveen Date: Wed, 9 Oct 2024 18:58:41 +0530 Subject: [PATCH 4/6] Update .github/workflows/ci.yml updated the spacing Co-authored-by: briskt <3172830+briskt@users.noreply.github.com> --- .github/workflows/ci.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 448215e..647b26a 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -25,8 +25,8 @@ jobs: - name: Log in to Docker Hub uses: docker/login-action@v3 with: - username: ${{ secrets.DOCKERHUB_USERNAME}} - password: ${{ secrets.DOCKERHUB_TOKEN}} + username: ${{ secrets.DOCKERHUB_USERNAME }} + password: ${{ secrets.DOCKERHUB_TOKEN }} # Step to login to GitHub Container Registry - name: Log in to GHCR From 0ed72a0e801e665572d03f7340475ae7c03a4409 Mon Sep 17 00:00:00 2001 From: Praveen Date: Wed, 9 Oct 2024 18:59:00 +0530 Subject: [PATCH 5/6] Update .github/workflows/ci.yml Co-authored-by: briskt <3172830+briskt@users.noreply.github.com> --- .github/workflows/ci.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 647b26a..3062146 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -45,7 +45,8 @@ jobs: ${{ vars.DOCKER_ORG }}/ecs-deploy # the name needs to be static "ecs-deploy" ghcr.io/${{ github.repository_owner }}/ecs-deploy tags: | - type=semver,pattern={{version}} + type=semver,pattern={{version}} + type=semver,pattern={{major.minor}} # Build and push Docker image to GHCR and Docker Hub From fda58f8deef9817becf885321b459de9b371ae64 Mon Sep 17 00:00:00 2001 From: Praveen Date: Wed, 9 Oct 2024 19:16:25 +0530 Subject: [PATCH 6/6] Update ecs-deploy updated the version in ecs_deploy --- ecs-deploy | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ecs-deploy b/ecs-deploy index 767b936..5da1416 100755 --- a/ecs-deploy +++ b/ecs-deploy @@ -1,7 +1,7 @@ #!/usr/bin/env bash # Setup default values for variables -VERSION="3.10.18" +VERSION="3.10.19" CLUSTER=false SERVICE=false TASK_DEFINITION=false