From c8f33cda284bf4a3507c2a46fefae6dc1365de1f Mon Sep 17 00:00:00 2001 From: Dmitry Borisov Date: Wed, 13 Oct 2021 13:21:26 +0300 Subject: [PATCH 01/20] update workflow 1 --- .github/workflows/build.yml | 46 ++++++++++++++++++++++++++----------- 1 file changed, 32 insertions(+), 14 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index e39669b..3b865f2 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -3,7 +3,7 @@ defaults: run: shell: bash env: - DOCKER_REGISTRY: hazelops + DOCKER_REGISTRY: hazeldeploy DOCKER_IMAGE_NAME: ecs-deploy on: @@ -17,19 +17,37 @@ jobs: runs-on: ubuntu-latest steps: - - name: Checkout Code - uses: actions/checkout@v2 + - name: Check Out Repo + uses: actions/checkout@v2 - - name: Login to DockerHub - uses: docker/login-action@v1 - with: - username: ${{ secrets.DOCKERHUB_USERNAME }} - password: ${{ secrets.DOCKERHUB_TOKEN }} + - name: Login to Docker Hub + uses: docker/login-action@v1 + with: + username: ${{ secrets.DOCKERHUB_USERNAME }} + password: ${{ secrets.DOCKERHUB_TOKEN }} - - name: Build Image - run: | - docker build -t $DOCKER_REGISTRY/$DOCKER_IMAGE_NAME:latest . + - name: Set up Docker Buildx + id: buildx + uses: docker/setup-buildx-action@v1 - - name: Push - run: | - docker push $DOCKER_REGISTRY/$DOCKER_IMAGE_NAME:latest + - name: Build and push + id: docker_build + uses: docker/build-push-action@v2 + with: + context: ./ + file: ./Dockerfile + push: true + tags: hazeldeploy/ecs-deploy:latest + + - name: Image digest + run: echo ${{ steps.docker_build.outputs.digest }} > digest.txt + + - uses: actions/upload-artifact@v1 + with: + name: digest + path: ./digest.txt + - name: Release + uses: softprops/action-gh-release@v1 + with: + files: digest.txt + tag_name: ecs-deploy@${{ steps.docker_build.outputs.digest }} From bc01a9f546bcebc83163a031b4b01c00fdc523b1 Mon Sep 17 00:00:00 2001 From: Dmitry Borisov Date: Wed, 13 Oct 2021 13:34:38 +0300 Subject: [PATCH 02/20] update workflow 2 --- .github/workflows/build.yml | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 3b865f2..bad2125 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -46,8 +46,11 @@ jobs: with: name: digest path: ./digest.txt - - name: Release - uses: softprops/action-gh-release@v1 - with: - files: digest.txt - tag_name: ecs-deploy@${{ steps.docker_build.outputs.digest }} + + - uses: "marvinpinto/action-automatic-releases@latest" + with: + repo_token: "${{ secrets.GITHUB_TOKEN }}" + automatic_release_tag: "latest" + prerelease: false + title: ecs-deploy@${{ steps.docker_build.outputs.digest }} + files: digest.txt From 19e55e44d92be8444c5490e398551d0c69b30271 Mon Sep 17 00:00:00 2001 From: Dmitry Borisov Date: Wed, 13 Oct 2021 13:36:45 +0300 Subject: [PATCH 03/20] update workflow 2 --- .github/workflows/build.yml | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index bad2125..83e09cb 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -47,10 +47,10 @@ jobs: name: digest path: ./digest.txt - - uses: "marvinpinto/action-automatic-releases@latest" - with: - repo_token: "${{ secrets.GITHUB_TOKEN }}" - automatic_release_tag: "latest" - prerelease: false - title: ecs-deploy@${{ steps.docker_build.outputs.digest }} - files: digest.txt + - uses: marvinpinto/action-automatic-releases@latest + with: + repo_token: "${{ secrets.GITHUB_TOKEN }}" + automatic_release_tag: "latest" + prerelease: false + title: ecs-deploy@${{ steps.docker_build.outputs.digest }} + files: digest.txt From b1e3fe08b8b67f022e1a1827a74f366e6748e874 Mon Sep 17 00:00:00 2001 From: Dmitry Borisov Date: Wed, 13 Oct 2021 17:06:18 +0300 Subject: [PATCH 04/20] update workflow 3 --- .github/workflows/build.yml | 20 ++++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 83e09cb..c706428 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -47,10 +47,18 @@ jobs: name: digest path: ./digest.txt - - uses: marvinpinto/action-automatic-releases@latest + - uses: ncipollo/release-action@v1 with: - repo_token: "${{ secrets.GITHUB_TOKEN }}" - automatic_release_tag: "latest" - prerelease: false - title: ecs-deploy@${{ steps.docker_build.outputs.digest }} - files: digest.txt + name: Release + artifacts: "digest.txt" + bodyFile: "ecs-deploy@${{ steps.docker_build.outputs.digest }}" + token: ${{ secrets.GITHUB_TOKEN }} + + +# - uses: marvinpinto/action-automatic-releases@latest +# with: +# repo_token: "${{ secrets.GITHUB_TOKEN }}" +# automatic_release_tag: "latest" +# prerelease: false +# title: ecs-deploy@${{ steps.docker_build.outputs.digest }} +# files: digest.txt From 83fe4177937834c0faced155ea4095f4c2aac3cc Mon Sep 17 00:00:00 2001 From: Dmitry Borisov Date: Wed, 13 Oct 2021 17:21:21 +0300 Subject: [PATCH 05/20] update workflow 4 --- .github/workflows/build.yml | 27 +++++++++++++-------------- 1 file changed, 13 insertions(+), 14 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index c706428..d7bd92e 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -47,18 +47,17 @@ jobs: name: digest path: ./digest.txt - - uses: ncipollo/release-action@v1 + - name: Get Time + id: time + uses: nanzm/get-time-action@v1.1 + with: + timeZone: 8 + format: 'YYYY-MM-DD-HH-mm-ss' + + - uses: marvinpinto/action-automatic-releases@latest with: - name: Release - artifacts: "digest.txt" - bodyFile: "ecs-deploy@${{ steps.docker_build.outputs.digest }}" - token: ${{ secrets.GITHUB_TOKEN }} - - -# - uses: marvinpinto/action-automatic-releases@latest -# with: -# repo_token: "${{ secrets.GITHUB_TOKEN }}" -# automatic_release_tag: "latest" -# prerelease: false -# title: ecs-deploy@${{ steps.docker_build.outputs.digest }} -# files: digest.txt + repo_token: "${{ secrets.GITHUB_TOKEN }}" + automatic_release_tag: "latest" + prerelease: false + title: Release at ${{ steps.time.outputs.time }} + files: digest.txt From 187951777e7f864936355f8401660487d7db2198 Mon Sep 17 00:00:00 2001 From: Dmitry Borisov Date: Wed, 13 Oct 2021 17:22:39 +0300 Subject: [PATCH 06/20] update workflow 4 --- .github/workflows/build.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index d7bd92e..7316550 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -48,9 +48,8 @@ jobs: path: ./digest.txt - name: Get Time - id: time uses: nanzm/get-time-action@v1.1 - with: + with: timeZone: 8 format: 'YYYY-MM-DD-HH-mm-ss' From e07e8e099ed6ac8b1ea2ba0ba25801264475907c Mon Sep 17 00:00:00 2001 From: Dmitry Borisov Date: Wed, 13 Oct 2021 17:25:01 +0300 Subject: [PATCH 07/20] update workflow 4 --- .github/workflows/build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 7316550..2fb1091 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -58,5 +58,5 @@ jobs: repo_token: "${{ secrets.GITHUB_TOKEN }}" automatic_release_tag: "latest" prerelease: false - title: Release at ${{ steps.time.outputs.time }} + title: Release at "${{ steps.time.outputs.time }}" files: digest.txt From 85abb8001863b981884c0cc9b729ba95587f1eec Mon Sep 17 00:00:00 2001 From: Dmitry Borisov Date: Wed, 13 Oct 2021 17:28:36 +0300 Subject: [PATCH 08/20] update workflow 4 --- .github/workflows/build.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 2fb1091..0f0aa84 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -48,15 +48,16 @@ jobs: path: ./digest.txt - name: Get Time + id: time uses: nanzm/get-time-action@v1.1 with: timeZone: 8 - format: 'YYYY-MM-DD-HH-mm-ss' + format: 'YYYY-MM-DD-HH-mm' - uses: marvinpinto/action-automatic-releases@latest with: repo_token: "${{ secrets.GITHUB_TOKEN }}" automatic_release_tag: "latest" prerelease: false - title: Release at "${{ steps.time.outputs.time }}" + title: Release at ${{ steps.time.outputs.time }} files: digest.txt From e1c2403a0203086b9feb64fcd12a33fa564b89eb Mon Sep 17 00:00:00 2001 From: Dmitry Borisov Date: Wed, 13 Oct 2021 17:32:46 +0300 Subject: [PATCH 09/20] update workflow 5 --- .github/workflows/build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 0f0aa84..8fcd7a3 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -57,7 +57,7 @@ jobs: - uses: marvinpinto/action-automatic-releases@latest with: repo_token: "${{ secrets.GITHUB_TOKEN }}" - automatic_release_tag: "latest" + automatic_release_tag: "${{ steps.docker_build.outputs.digest }}" prerelease: false title: Release at ${{ steps.time.outputs.time }} files: digest.txt From 0d3b72dd47b41f730a487a6400c8b7be93dc9f86 Mon Sep 17 00:00:00 2001 From: Dmitry Borisov Date: Wed, 13 Oct 2021 17:34:50 +0300 Subject: [PATCH 10/20] update workflow 5 --- .github/workflows/build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 8fcd7a3..0f0aa84 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -57,7 +57,7 @@ jobs: - uses: marvinpinto/action-automatic-releases@latest with: repo_token: "${{ secrets.GITHUB_TOKEN }}" - automatic_release_tag: "${{ steps.docker_build.outputs.digest }}" + automatic_release_tag: "latest" prerelease: false title: Release at ${{ steps.time.outputs.time }} files: digest.txt From 24bebe10e1081353adeebe9d11762b96aca22c03 Mon Sep 17 00:00:00 2001 From: Dmitry Borisov Date: Wed, 13 Oct 2021 21:47:27 +0300 Subject: [PATCH 11/20] update workflow 6 --- .github/workflows/build.yml | 30 +++++++++++++++++++++++------- 1 file changed, 23 insertions(+), 7 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 0f0aa84..6b469ab 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -52,12 +52,28 @@ jobs: uses: nanzm/get-time-action@v1.1 with: timeZone: 8 - format: 'YYYY-MM-DD-HH-mm' + format: 'YYYY-MM-DD' - - uses: marvinpinto/action-automatic-releases@latest + - name: Bump version and push tag + id: tag_version + uses: mathieudutour/github-tag-action@v5.6 with: - repo_token: "${{ secrets.GITHUB_TOKEN }}" - automatic_release_tag: "latest" - prerelease: false - title: Release at ${{ steps.time.outputs.time }} - files: digest.txt + github_token: ${{ secrets.GITHUB_TOKEN }} + - name: Create a GitHub release + uses: ncipollo/release-action@v1 + with: + tag: ${{ steps.tag_version.outputs.new_tag }} + name: Release ${{ steps.tag_version.outputs.new_tag }} on ${{ steps.time.outputs.time }} + artifacts: "digest.txt" + body: | + ${{ steps.tag_version.outputs.changelog }} + Digest: ${{ steps.docker_build.outputs.digest }} + + +# - uses: marvinpinto/action-automatic-releases@latest +# with: +# repo_token: "${{ secrets.GITHUB_TOKEN }}" +# automatic_release_tag: "latest" +# prerelease: false +# title: Release on ${{ steps.time.outputs.time }} +# files: digest.txt From 7d53c10c468d967e10eef88d19f5ee6004fc63b0 Mon Sep 17 00:00:00 2001 From: Dmitry Borisov Date: Wed, 13 Oct 2021 21:54:41 +0300 Subject: [PATCH 12/20] update workflow 7 --- .github/workflows/build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 6b469ab..18b3860 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -63,10 +63,10 @@ jobs: uses: ncipollo/release-action@v1 with: tag: ${{ steps.tag_version.outputs.new_tag }} + tag_prefix: "v" name: Release ${{ steps.tag_version.outputs.new_tag }} on ${{ steps.time.outputs.time }} artifacts: "digest.txt" body: | - ${{ steps.tag_version.outputs.changelog }} Digest: ${{ steps.docker_build.outputs.digest }} From 27e3847e4e806c4ca164d1500620b89a07a3d2bf Mon Sep 17 00:00:00 2001 From: Dmitry Borisov Date: Wed, 13 Oct 2021 21:58:02 +0300 Subject: [PATCH 13/20] update workflow 7 --- .github/workflows/build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 18b3860..a4b9f29 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -59,11 +59,11 @@ jobs: uses: mathieudutour/github-tag-action@v5.6 with: github_token: ${{ secrets.GITHUB_TOKEN }} + tag_prefix: "v" - name: Create a GitHub release uses: ncipollo/release-action@v1 with: tag: ${{ steps.tag_version.outputs.new_tag }} - tag_prefix: "v" name: Release ${{ steps.tag_version.outputs.new_tag }} on ${{ steps.time.outputs.time }} artifacts: "digest.txt" body: | From bc7230b3ec823078869f0d9cfd26465ab3307482 Mon Sep 17 00:00:00 2001 From: Dmitry Borisov Date: Wed, 13 Oct 2021 22:03:22 +0300 Subject: [PATCH 14/20] update workflow 7 --- .github/workflows/build.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index a4b9f29..d6feea5 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -60,6 +60,7 @@ jobs: with: github_token: ${{ secrets.GITHUB_TOKEN }} tag_prefix: "v" + release_branches: "develop" - name: Create a GitHub release uses: ncipollo/release-action@v1 with: From 5c4d375c87446f5389dcfd8912b0f409e61de797 Mon Sep 17 00:00:00 2001 From: Dmitry Borisov Date: Wed, 13 Oct 2021 22:10:50 +0300 Subject: [PATCH 15/20] update workflow 8 --- .github/workflows/build.yml | 20 +++++++++++++++----- 1 file changed, 15 insertions(+), 5 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index d6feea5..21ba07f 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -54,13 +54,23 @@ jobs: timeZone: 8 format: 'YYYY-MM-DD' +# - name: Bump version and push tag +# id: tag_version +# uses: mathieudutour/github-tag-action@v5.6 +# with: +# github_token: ${{ secrets.GITHUB_TOKEN }} +# tag_prefix: "v" +# release_branches: "develop" + - name: Bump version and push tag id: tag_version - uses: mathieudutour/github-tag-action@v5.6 - with: - github_token: ${{ secrets.GITHUB_TOKEN }} - tag_prefix: "v" - release_branches: "develop" + uses: anothrNick/github-tag-action@1.36.0 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + WITH_V: true + INITIAL_VERSION: 0.0.0 + RELEASE_BRANCHES: develop + - name: Create a GitHub release uses: ncipollo/release-action@v1 with: From 131fc444a22461c1ab0574dffcbeabf6383eeb14 Mon Sep 17 00:00:00 2001 From: Dmitry Borisov Date: Wed, 13 Oct 2021 22:42:45 +0300 Subject: [PATCH 16/20] update workflow 8 --- .github/workflows/build.yml | 21 ++------------------- 1 file changed, 2 insertions(+), 19 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 21ba07f..83a1964 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -53,15 +53,7 @@ jobs: with: timeZone: 8 format: 'YYYY-MM-DD' - -# - name: Bump version and push tag -# id: tag_version -# uses: mathieudutour/github-tag-action@v5.6 -# with: -# github_token: ${{ secrets.GITHUB_TOKEN }} -# tag_prefix: "v" -# release_branches: "develop" - + - name: Bump version and push tag id: tag_version uses: anothrNick/github-tag-action@1.36.0 @@ -78,13 +70,4 @@ jobs: name: Release ${{ steps.tag_version.outputs.new_tag }} on ${{ steps.time.outputs.time }} artifacts: "digest.txt" body: | - Digest: ${{ steps.docker_build.outputs.digest }} - - -# - uses: marvinpinto/action-automatic-releases@latest -# with: -# repo_token: "${{ secrets.GITHUB_TOKEN }}" -# automatic_release_tag: "latest" -# prerelease: false -# title: Release on ${{ steps.time.outputs.time }} -# files: digest.txt + ecs-deploy image digest: ${{ steps.docker_build.outputs.digest }} From d2392572e2eb701f7b68866ec8d4dfc096728ade Mon Sep 17 00:00:00 2001 From: Dmitry Borisov Date: Wed, 13 Oct 2021 22:47:04 +0300 Subject: [PATCH 17/20] update workflow 8 --- .github/workflows/build.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 83a1964..1696882 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -53,7 +53,7 @@ jobs: with: timeZone: 8 format: 'YYYY-MM-DD' - + - name: Bump version and push tag id: tag_version uses: anothrNick/github-tag-action@1.36.0 @@ -70,4 +70,4 @@ jobs: name: Release ${{ steps.tag_version.outputs.new_tag }} on ${{ steps.time.outputs.time }} artifacts: "digest.txt" body: | - ecs-deploy image digest: ${{ steps.docker_build.outputs.digest }} + Docker image digest: ${{ steps.docker_build.outputs.digest }} From 4dd588701eb2223ed9e4c53db7a6c9198490d3d8 Mon Sep 17 00:00:00 2001 From: Dmitry Borisov Date: Thu, 14 Oct 2021 13:13:19 +0300 Subject: [PATCH 18/20] update workflow 9 --- .github/workflows/build.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 1696882..d3a50e5 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -3,7 +3,7 @@ defaults: run: shell: bash env: - DOCKER_REGISTRY: hazeldeploy + DOCKER_REGISTRY: hazelops DOCKER_IMAGE_NAME: ecs-deploy on: @@ -37,7 +37,7 @@ jobs: context: ./ file: ./Dockerfile push: true - tags: hazeldeploy/ecs-deploy:latest + tags: ${{ DOCKER_IMAGE_NAME }}/${{ env.DOCKER_REGISTRY }}:latest - name: Image digest run: echo ${{ steps.docker_build.outputs.digest }} > digest.txt @@ -51,7 +51,7 @@ jobs: id: time uses: nanzm/get-time-action@v1.1 with: - timeZone: 8 + timeZone: 0 format: 'YYYY-MM-DD' - name: Bump version and push tag From 56b06d8629022579c91222704a31b3f1bc304533 Mon Sep 17 00:00:00 2001 From: Dmitry Borisov Date: Thu, 14 Oct 2021 13:15:15 +0300 Subject: [PATCH 19/20] update workflow 9 --- .github/workflows/build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index d3a50e5..a4df6a2 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -37,7 +37,7 @@ jobs: context: ./ file: ./Dockerfile push: true - tags: ${{ DOCKER_IMAGE_NAME }}/${{ env.DOCKER_REGISTRY }}:latest + tags: ${{ env.DOCKER_IMAGE_NAME }}/${{ env.DOCKER_REGISTRY }}:latest - name: Image digest run: echo ${{ steps.docker_build.outputs.digest }} > digest.txt From 64a19a3aae78d8fa2b4afc3d30a5e8b07692cba2 Mon Sep 17 00:00:00 2001 From: Dmitry Borisov Date: Thu, 14 Oct 2021 13:22:34 +0300 Subject: [PATCH 20/20] update workflow 9 --- .github/workflows/build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index a4df6a2..22a4db1 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -37,7 +37,7 @@ jobs: context: ./ file: ./Dockerfile push: true - tags: ${{ env.DOCKER_IMAGE_NAME }}/${{ env.DOCKER_REGISTRY }}:latest + tags: ${{ env.DOCKER_REGISTRY }}/${{ env.DOCKER_IMAGE_NAME }}:latest - name: Image digest run: echo ${{ steps.docker_build.outputs.digest }} > digest.txt