From 79b3e5fb0751df1cecb9366b808a82f23d50b1d2 Mon Sep 17 00:00:00 2001 From: Jerry Date: Tue, 20 Jun 2023 21:39:30 +0300 Subject: [PATCH 01/34] Create docker-image.yml b1 --- .github/workflows/docker-image.yml | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 .github/workflows/docker-image.yml diff --git a/.github/workflows/docker-image.yml b/.github/workflows/docker-image.yml new file mode 100644 index 0000000..4a156c7 --- /dev/null +++ b/.github/workflows/docker-image.yml @@ -0,0 +1,17 @@ +name: Docker Image CI + +on: + workflow_dispatch: + + release: + types: [published] + + +jobs: + build: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v3 + - name: Build the Docker image + run: docker build . --file Dockerfile --tag my-image-name:$(date +%s) From 8f39c3c12a9982a8a0727ba07266c4117ffc6255 Mon Sep 17 00:00:00 2001 From: Jerry Date: Tue, 20 Jun 2023 22:49:42 +0300 Subject: [PATCH 02/34] Update docker-image.yml --- .github/workflows/docker-image.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/docker-image.yml b/.github/workflows/docker-image.yml index 4a156c7..f379da3 100644 --- a/.github/workflows/docker-image.yml +++ b/.github/workflows/docker-image.yml @@ -10,8 +10,7 @@ on: jobs: build: runs-on: ubuntu-latest - steps: - uses: actions/checkout@v3 - name: Build the Docker image - run: docker build . --file Dockerfile --tag my-image-name:$(date +%s) + run: docker build . --file Dockerfile --tag {{version}}:latest From bf2954231a0d7301df9b41b90ec50001025d5698 Mon Sep 17 00:00:00 2001 From: Jerry Date: Tue, 20 Jun 2023 23:05:40 +0300 Subject: [PATCH 03/34] Update docker-image.yml --- .github/workflows/docker-image.yml | 20 +++++++++++++++++--- 1 file changed, 17 insertions(+), 3 deletions(-) diff --git a/.github/workflows/docker-image.yml b/.github/workflows/docker-image.yml index f379da3..dc1330f 100644 --- a/.github/workflows/docker-image.yml +++ b/.github/workflows/docker-image.yml @@ -6,11 +6,25 @@ on: release: types: [published] - jobs: build: runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 - - name: Build the Docker image - run: docker build . --file Dockerfile --tag {{version}}:latest + - name: Login to image repository + uses: docker/login-action@v2 + with: + registry: ghcr.io + username: ${{ github.actor }} + password: ${{ secrets.GHCR_TOKEN }} + - name: Get the version + id: vars + run: echo ::set-output name=tag::$(echo ${GITHUB_REF:10}) + - name: Build the tagged Docker image + run: docker build . --file Dockerfile --tag DogsTailFarmer/exchanges-wrapper:${{steps.vars.outputs.tag}} + - name: Push the tagged Docker image + run: docker push DogsTailFarmer/exchanges-wrapper:${{steps.vars.outputs.tag}} + - name: Build the latest Docker image + run: docker build . --file Dockerfile --tag DogsTailFarmer/exchanges-wrapper:latest + - name: Push the latest Docker image + run: docker push DogsTailFarmer/exchanges-wrapper:latest From 5ea9f629c0b86c357bbdff52eea9d58c617a62b7 Mon Sep 17 00:00:00 2001 From: Jerry Date: Tue, 20 Jun 2023 23:08:22 +0300 Subject: [PATCH 04/34] Update docker-image.yml --- .github/workflows/docker-image.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/docker-image.yml b/.github/workflows/docker-image.yml index dc1330f..daafe37 100644 --- a/.github/workflows/docker-image.yml +++ b/.github/workflows/docker-image.yml @@ -11,12 +11,12 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 - - name: Login to image repository + - name: Login to GHCR uses: docker/login-action@v2 with: registry: ghcr.io - username: ${{ github.actor }} - password: ${{ secrets.GHCR_TOKEN }} + username: ${{ github.repository_owner }} + password: ${{ secrets.GITHUB_TOKEN }} - name: Get the version id: vars run: echo ::set-output name=tag::$(echo ${GITHUB_REF:10}) From 62e8c99263ed824394790b4ff0614272762a48fc Mon Sep 17 00:00:00 2001 From: Jerry Date: Tue, 20 Jun 2023 23:21:07 +0300 Subject: [PATCH 05/34] Update docker-image.yml --- .github/workflows/docker-image.yml | 46 ++++++++++++++++++++++-------- 1 file changed, 34 insertions(+), 12 deletions(-) diff --git a/.github/workflows/docker-image.yml b/.github/workflows/docker-image.yml index daafe37..2b81835 100644 --- a/.github/workflows/docker-image.yml +++ b/.github/workflows/docker-image.yml @@ -10,21 +10,43 @@ jobs: build: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - name: Checkout + uses: actions/checkout@v3 + + - name: Docker meta + id: meta + uses: docker/metadata-action@v4 + with: + # list of Docker images to use as base name for tags + images: | + name/app + ghcr.io/username/app + # generate Docker tags based on the following events/attributes + tags: | + type=schedule + type=ref,event=branch + type=ref,event=pr + type=semver,pattern={{version}} + type=semver,pattern={{major}}.{{minor}} + type=semver,pattern={{major}} + type=sha + + - name: Set up QEMU + uses: docker/setup-qemu-action@v2 + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v2 + - name: Login to GHCR uses: docker/login-action@v2 with: registry: ghcr.io username: ${{ github.repository_owner }} password: ${{ secrets.GITHUB_TOKEN }} - - name: Get the version - id: vars - run: echo ::set-output name=tag::$(echo ${GITHUB_REF:10}) - - name: Build the tagged Docker image - run: docker build . --file Dockerfile --tag DogsTailFarmer/exchanges-wrapper:${{steps.vars.outputs.tag}} - - name: Push the tagged Docker image - run: docker push DogsTailFarmer/exchanges-wrapper:${{steps.vars.outputs.tag}} - - name: Build the latest Docker image - run: docker build . --file Dockerfile --tag DogsTailFarmer/exchanges-wrapper:latest - - name: Push the latest Docker image - run: docker push DogsTailFarmer/exchanges-wrapper:latest + + - name: Build and push + uses: docker/build-push-action@v4 + with: + context: . + push: ${{ github.event_name != 'pull_request' }} + tags: ${{ steps.meta.outputs.tags }} + labels: ${{ steps.meta.outputs.labels }} From 41b58fa102738f7873d8acc1158ac39ae892abed Mon Sep 17 00:00:00 2001 From: Jerry Date: Tue, 20 Jun 2023 23:33:43 +0300 Subject: [PATCH 06/34] Update docker-image.yml --- .github/workflows/docker-image.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/docker-image.yml b/.github/workflows/docker-image.yml index 2b81835..3038b46 100644 --- a/.github/workflows/docker-image.yml +++ b/.github/workflows/docker-image.yml @@ -20,7 +20,7 @@ jobs: # list of Docker images to use as base name for tags images: | name/app - ghcr.io/username/app + ghcr.io/dogstailfarmer/exchanges-wrapper # generate Docker tags based on the following events/attributes tags: | type=schedule @@ -47,6 +47,6 @@ jobs: uses: docker/build-push-action@v4 with: context: . - push: ${{ github.event_name != 'pull_request' }} + push: true tags: ${{ steps.meta.outputs.tags }} labels: ${{ steps.meta.outputs.labels }} From 17c052e8a9842fd03f383057e5f524fc418edd29 Mon Sep 17 00:00:00 2001 From: Jerry Date: Tue, 20 Jun 2023 23:37:55 +0300 Subject: [PATCH 07/34] Update docker-image.yml --- .github/workflows/docker-image.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/docker-image.yml b/.github/workflows/docker-image.yml index 3038b46..8f877dc 100644 --- a/.github/workflows/docker-image.yml +++ b/.github/workflows/docker-image.yml @@ -19,7 +19,7 @@ jobs: with: # list of Docker images to use as base name for tags images: | - name/app + dogstailfarmer/exchanges-wrapper ghcr.io/dogstailfarmer/exchanges-wrapper # generate Docker tags based on the following events/attributes tags: | From 9825fd3d22a64a737e48afd05417d6848719a164 Mon Sep 17 00:00:00 2001 From: Jerry Date: Tue, 20 Jun 2023 23:42:12 +0300 Subject: [PATCH 08/34] Update docker-image.yml --- .github/workflows/docker-image.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/docker-image.yml b/.github/workflows/docker-image.yml index 8f877dc..cc9b56b 100644 --- a/.github/workflows/docker-image.yml +++ b/.github/workflows/docker-image.yml @@ -46,7 +46,7 @@ jobs: - name: Build and push uses: docker/build-push-action@v4 with: - context: . + context: "{{defaultContext}}:exchanges-wrapper" push: true tags: ${{ steps.meta.outputs.tags }} labels: ${{ steps.meta.outputs.labels }} From f325d76218816408a538f334c43cfdc00f28e559 Mon Sep 17 00:00:00 2001 From: Jerry Date: Tue, 20 Jun 2023 23:55:20 +0300 Subject: [PATCH 09/34] Update docker-image.yml --- .github/workflows/docker-image.yml | 33 ++++++++---------------------- 1 file changed, 8 insertions(+), 25 deletions(-) diff --git a/.github/workflows/docker-image.yml b/.github/workflows/docker-image.yml index cc9b56b..868ed43 100644 --- a/.github/workflows/docker-image.yml +++ b/.github/workflows/docker-image.yml @@ -12,30 +12,7 @@ jobs: steps: - name: Checkout uses: actions/checkout@v3 - - - name: Docker meta - id: meta - uses: docker/metadata-action@v4 - with: - # list of Docker images to use as base name for tags - images: | - dogstailfarmer/exchanges-wrapper - ghcr.io/dogstailfarmer/exchanges-wrapper - # generate Docker tags based on the following events/attributes - tags: | - type=schedule - type=ref,event=branch - type=ref,event=pr - type=semver,pattern={{version}} - type=semver,pattern={{major}}.{{minor}} - type=semver,pattern={{major}} - type=sha - - - name: Set up QEMU - uses: docker/setup-qemu-action@v2 - - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v2 - + - name: Login to GHCR uses: docker/login-action@v2 with: @@ -43,10 +20,16 @@ jobs: username: ${{ github.repository_owner }} password: ${{ secrets.GITHUB_TOKEN }} + - name: Extract metadata (tags, labels) for Docker + id: meta + uses: docker/metadata-action@9ec57ed1fcdbf14dcef7dfbe97b2010124a938b7 + with: + images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }} + - name: Build and push uses: docker/build-push-action@v4 with: - context: "{{defaultContext}}:exchanges-wrapper" + context: . push: true tags: ${{ steps.meta.outputs.tags }} labels: ${{ steps.meta.outputs.labels }} From 56cf90609742c51789c1694d477138018c7ac35d Mon Sep 17 00:00:00 2001 From: Jerry Date: Wed, 21 Jun 2023 00:00:04 +0300 Subject: [PATCH 10/34] Update docker-image.yml --- .github/workflows/docker-image.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/docker-image.yml b/.github/workflows/docker-image.yml index 868ed43..2f53064 100644 --- a/.github/workflows/docker-image.yml +++ b/.github/workflows/docker-image.yml @@ -22,7 +22,7 @@ jobs: - name: Extract metadata (tags, labels) for Docker id: meta - uses: docker/metadata-action@9ec57ed1fcdbf14dcef7dfbe97b2010124a938b7 + uses: dockerbakery/github-metadata-action@v2.1 with: images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }} From eefd0f53d6ed60ee8dd4524544c6b38237b9782c Mon Sep 17 00:00:00 2001 From: Jerry Date: Wed, 21 Jun 2023 00:19:37 +0300 Subject: [PATCH 11/34] Update docker-image.yml --- .github/workflows/docker-image.yml | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/.github/workflows/docker-image.yml b/.github/workflows/docker-image.yml index 2f53064..535c721 100644 --- a/.github/workflows/docker-image.yml +++ b/.github/workflows/docker-image.yml @@ -20,11 +20,14 @@ jobs: username: ${{ github.repository_owner }} password: ${{ secrets.GITHUB_TOKEN }} - - name: Extract metadata (tags, labels) for Docker - id: meta - uses: dockerbakery/github-metadata-action@v2.1 + - name: Docker Metadata action + uses: docker/metadata-action@v4.6.0 with: - images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }} + images: | + dogstailfarmer/exchanges-wrapper + tags: | + type=semver,pattern={{major}}.{{minor}} + type=raw,value=latest,enable={{is_default_branch}} - name: Build and push uses: docker/build-push-action@v4 From 339c6a01cde6c0117b9dd4fa95729a66b65ec925 Mon Sep 17 00:00:00 2001 From: Jerry Date: Wed, 21 Jun 2023 00:22:26 +0300 Subject: [PATCH 12/34] Update docker-image.yml --- .github/workflows/docker-image.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/docker-image.yml b/.github/workflows/docker-image.yml index 535c721..177ec19 100644 --- a/.github/workflows/docker-image.yml +++ b/.github/workflows/docker-image.yml @@ -26,6 +26,7 @@ jobs: images: | dogstailfarmer/exchanges-wrapper tags: | + type=match,pattern=v(.*),group=1 type=semver,pattern={{major}}.{{minor}} type=raw,value=latest,enable={{is_default_branch}} From 0bfaa017bfb2c41df1d48278325ad4401c37f62b Mon Sep 17 00:00:00 2001 From: Jerry Date: Wed, 21 Jun 2023 00:27:05 +0300 Subject: [PATCH 13/34] Update docker-image.yml --- .github/workflows/docker-image.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/docker-image.yml b/.github/workflows/docker-image.yml index 177ec19..e2f4746 100644 --- a/.github/workflows/docker-image.yml +++ b/.github/workflows/docker-image.yml @@ -27,8 +27,9 @@ jobs: dogstailfarmer/exchanges-wrapper tags: | type=match,pattern=v(.*),group=1 - type=semver,pattern={{major}}.{{minor}} + type=semver,pattern={{version}} type=raw,value=latest,enable={{is_default_branch}} + type=schedule,pattern={{date 'YYYYMMDD'}} - name: Build and push uses: docker/build-push-action@v4 From 943c11288ac1c1deaf8f418b200b05024886b0a5 Mon Sep 17 00:00:00 2001 From: Jerry Date: Wed, 21 Jun 2023 00:45:14 +0300 Subject: [PATCH 14/34] Update docker-image.yml --- .github/workflows/docker-image.yml | 25 ++++++++++--------------- 1 file changed, 10 insertions(+), 15 deletions(-) diff --git a/.github/workflows/docker-image.yml b/.github/workflows/docker-image.yml index e2f4746..2ee7e0f 100644 --- a/.github/workflows/docker-image.yml +++ b/.github/workflows/docker-image.yml @@ -2,7 +2,10 @@ name: Docker Image CI on: workflow_dispatch: - + inputs: + tag: + description: 'New tag name' + required: true release: types: [published] @@ -12,7 +15,10 @@ jobs: steps: - name: Checkout uses: actions/checkout@v3 - + with: + fetch-depth: 0 + - run: git tag ${{ github.event.inputs.tag }} + - name: Login to GHCR uses: docker/login-action@v2 with: @@ -20,21 +26,10 @@ jobs: username: ${{ github.repository_owner }} password: ${{ secrets.GITHUB_TOKEN }} - - name: Docker Metadata action - uses: docker/metadata-action@v4.6.0 - with: - images: | - dogstailfarmer/exchanges-wrapper - tags: | - type=match,pattern=v(.*),group=1 - type=semver,pattern={{version}} - type=raw,value=latest,enable={{is_default_branch}} - type=schedule,pattern={{date 'YYYYMMDD'}} - - name: Build and push uses: docker/build-push-action@v4 with: context: . push: true - tags: ${{ steps.meta.outputs.tags }} - labels: ${{ steps.meta.outputs.labels }} + # tags: ${{ steps.meta.outputs.tags }} + tags: ${{ tag }} From d37cb2976a2cfb0a7bcd8590e1a3ee95e107bc1b Mon Sep 17 00:00:00 2001 From: Jerry Date: Wed, 21 Jun 2023 01:07:14 +0300 Subject: [PATCH 15/34] Update docker-image.yml --- .github/workflows/docker-image.yml | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/.github/workflows/docker-image.yml b/.github/workflows/docker-image.yml index 2ee7e0f..e506da1 100644 --- a/.github/workflows/docker-image.yml +++ b/.github/workflows/docker-image.yml @@ -2,10 +2,6 @@ name: Docker Image CI on: workflow_dispatch: - inputs: - tag: - description: 'New tag name' - required: true release: types: [published] @@ -15,10 +11,7 @@ jobs: steps: - name: Checkout uses: actions/checkout@v3 - with: - fetch-depth: 0 - - run: git tag ${{ github.event.inputs.tag }} - + - name: Login to GHCR uses: docker/login-action@v2 with: @@ -31,5 +24,4 @@ jobs: with: context: . push: true - # tags: ${{ steps.meta.outputs.tags }} - tags: ${{ tag }} + tags: dogstailfarmer/exchanges-wrapper:latest From 2eaf0ab3813c5fc98ca8f55a6f63235f72ab4016 Mon Sep 17 00:00:00 2001 From: Jerry Date: Wed, 21 Jun 2023 10:15:46 +0300 Subject: [PATCH 16/34] Update docker-image.yml --- .github/workflows/docker-image.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/docker-image.yml b/.github/workflows/docker-image.yml index e506da1..8dd0e11 100644 --- a/.github/workflows/docker-image.yml +++ b/.github/workflows/docker-image.yml @@ -24,4 +24,4 @@ jobs: with: context: . push: true - tags: dogstailfarmer/exchanges-wrapper:latest + tags: ghcr.io/dogstailfarmer/exchanges-wrapper:latest From 97c476afd3ccb718d9a0c924f056616b7db2aadf Mon Sep 17 00:00:00 2001 From: Jerry Date: Wed, 21 Jun 2023 10:44:05 +0300 Subject: [PATCH 17/34] Update docker-image.yml --- .github/workflows/docker-image.yml | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/.github/workflows/docker-image.yml b/.github/workflows/docker-image.yml index 8dd0e11..720fd94 100644 --- a/.github/workflows/docker-image.yml +++ b/.github/workflows/docker-image.yml @@ -20,8 +20,6 @@ jobs: password: ${{ secrets.GITHUB_TOKEN }} - name: Build and push - uses: docker/build-push-action@v4 - with: - context: . - push: true - tags: ghcr.io/dogstailfarmer/exchanges-wrapper:latest + run: | + docker build . --file Dockerfile --tag ghcr.io/dogstailfarmer/exchanges-wrapper:latest + docker push ghcr.io/dogstailfarmer/exchanges-wrapper:latest From d2ab56512ed1ce4e19d52205de2fb8d5e4983e1b Mon Sep 17 00:00:00 2001 From: Jerry Date: Wed, 21 Jun 2023 11:13:05 +0300 Subject: [PATCH 18/34] Update docker-image.yml --- .github/workflows/docker-image.yml | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/.github/workflows/docker-image.yml b/.github/workflows/docker-image.yml index 720fd94..16c348f 100644 --- a/.github/workflows/docker-image.yml +++ b/.github/workflows/docker-image.yml @@ -11,7 +11,12 @@ jobs: steps: - name: Checkout uses: actions/checkout@v3 - + + - name: Set tag + env: + IMAGE_TAG: ${{ github.sha }} + + - name: Login to GHCR uses: docker/login-action@v2 with: @@ -21,5 +26,5 @@ jobs: - name: Build and push run: | - docker build . --file Dockerfile --tag ghcr.io/dogstailfarmer/exchanges-wrapper:latest - docker push ghcr.io/dogstailfarmer/exchanges-wrapper:latest + docker build . --file Dockerfile --tag ghcr.io/dogstailfarmer/exchanges-wrapper:$IMAGE_TAG + # docker push ghcr.io/dogstailfarmer/exchanges-wrapper:latest From e8ad356f6c2224ff422caada6b7f8ca8c7e9ced0 Mon Sep 17 00:00:00 2001 From: Jerry Date: Wed, 21 Jun 2023 11:14:28 +0300 Subject: [PATCH 19/34] Update docker-image.yml --- .github/workflows/docker-image.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/docker-image.yml b/.github/workflows/docker-image.yml index 16c348f..22f8049 100644 --- a/.github/workflows/docker-image.yml +++ b/.github/workflows/docker-image.yml @@ -12,7 +12,6 @@ jobs: - name: Checkout uses: actions/checkout@v3 - - name: Set tag env: IMAGE_TAG: ${{ github.sha }} From b5ad9d184bc31324be83f11e6ae71d757a35a43b Mon Sep 17 00:00:00 2001 From: Jerry Date: Wed, 21 Jun 2023 11:22:52 +0300 Subject: [PATCH 20/34] Update docker-image.yml --- .github/workflows/docker-image.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/docker-image.yml b/.github/workflows/docker-image.yml index 22f8049..3735b5a 100644 --- a/.github/workflows/docker-image.yml +++ b/.github/workflows/docker-image.yml @@ -14,7 +14,7 @@ jobs: env: IMAGE_TAG: ${{ github.sha }} - + REPOSITORY: "ghcr.io/dogstailfarmer/exchanges-wrapper" - name: Login to GHCR uses: docker/login-action@v2 @@ -25,5 +25,6 @@ jobs: - name: Build and push run: | - docker build . --file Dockerfile --tag ghcr.io/dogstailfarmer/exchanges-wrapper:$IMAGE_TAG + docker build . --file Dockerfile --tag $REPOSITORY:$IMAGE_TAG + # docker push ghcr.io/dogstailfarmer/exchanges-wrapper:latest # docker push ghcr.io/dogstailfarmer/exchanges-wrapper:latest From 6f3ee959401761db36be8f4920288f3cb0a46f35 Mon Sep 17 00:00:00 2001 From: Jerry Date: Wed, 21 Jun 2023 11:25:19 +0300 Subject: [PATCH 21/34] Update docker-image.yml --- .github/workflows/docker-image.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/docker-image.yml b/.github/workflows/docker-image.yml index 3735b5a..6870d81 100644 --- a/.github/workflows/docker-image.yml +++ b/.github/workflows/docker-image.yml @@ -25,6 +25,6 @@ jobs: - name: Build and push run: | - docker build . --file Dockerfile --tag $REPOSITORY:$IMAGE_TAG + docker build --file Dockerfile -tag $REPOSITORY:$IMAGE_TAG . # docker push ghcr.io/dogstailfarmer/exchanges-wrapper:latest # docker push ghcr.io/dogstailfarmer/exchanges-wrapper:latest From 7035cd0cbcb7028e6902ff51d4ec2ab5684974b2 Mon Sep 17 00:00:00 2001 From: Jerry Date: Wed, 21 Jun 2023 11:25:53 +0300 Subject: [PATCH 22/34] Update docker-image.yml --- .github/workflows/docker-image.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/docker-image.yml b/.github/workflows/docker-image.yml index 6870d81..1701dad 100644 --- a/.github/workflows/docker-image.yml +++ b/.github/workflows/docker-image.yml @@ -25,6 +25,6 @@ jobs: - name: Build and push run: | - docker build --file Dockerfile -tag $REPOSITORY:$IMAGE_TAG . + docker build -t $REPOSITORY:$IMAGE_TAG . # docker push ghcr.io/dogstailfarmer/exchanges-wrapper:latest # docker push ghcr.io/dogstailfarmer/exchanges-wrapper:latest From 9539f8469ceba4f28a70e07df4810301db5d41f7 Mon Sep 17 00:00:00 2001 From: Jerry Date: Wed, 21 Jun 2023 12:05:01 +0300 Subject: [PATCH 23/34] Update docker-image.yml --- .github/workflows/docker-image.yml | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/.github/workflows/docker-image.yml b/.github/workflows/docker-image.yml index 1701dad..fb62a65 100644 --- a/.github/workflows/docker-image.yml +++ b/.github/workflows/docker-image.yml @@ -5,17 +5,17 @@ on: release: types: [published] +env: + IMAGE_TAG: ${{ github.sha }} + REPOSITORY: ghcr.io/dogstailfarmer/exchanges-wrapper + jobs: build: runs-on: ubuntu-latest steps: - name: Checkout uses: actions/checkout@v3 - - env: - IMAGE_TAG: ${{ github.sha }} - REPOSITORY: "ghcr.io/dogstailfarmer/exchanges-wrapper" - + - name: Login to GHCR uses: docker/login-action@v2 with: @@ -25,6 +25,10 @@ jobs: - name: Build and push run: | - docker build -t $REPOSITORY:$IMAGE_TAG . + + echo $IMAGE_TAG + echo $REPOSITORY + + docker build . --file Dockerfile --tag $REPOSITORY:$IMAGE_TAG # docker push ghcr.io/dogstailfarmer/exchanges-wrapper:latest # docker push ghcr.io/dogstailfarmer/exchanges-wrapper:latest From e8c195611d2edc9283971bda79de7bcfa37b6e37 Mon Sep 17 00:00:00 2001 From: Jerry Date: Wed, 21 Jun 2023 12:29:35 +0300 Subject: [PATCH 24/34] Update docker-image.yml --- .github/workflows/docker-image.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/docker-image.yml b/.github/workflows/docker-image.yml index fb62a65..dc1c778 100644 --- a/.github/workflows/docker-image.yml +++ b/.github/workflows/docker-image.yml @@ -7,7 +7,7 @@ on: env: IMAGE_TAG: ${{ github.sha }} - REPOSITORY: ghcr.io/dogstailfarmer/exchanges-wrapper + REPOSITORY: ghcr.io/$GITHUB_REPOSITORY jobs: build: @@ -28,7 +28,7 @@ jobs: echo $IMAGE_TAG echo $REPOSITORY - + docker build . --file Dockerfile --tag $REPOSITORY:$IMAGE_TAG # docker push ghcr.io/dogstailfarmer/exchanges-wrapper:latest # docker push ghcr.io/dogstailfarmer/exchanges-wrapper:latest From 14ae7d7c7811c8b2a0459951ca42774dbb7d755d Mon Sep 17 00:00:00 2001 From: Jerry Date: Wed, 21 Jun 2023 12:32:48 +0300 Subject: [PATCH 25/34] Update docker-image.yml --- .github/workflows/docker-image.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/docker-image.yml b/.github/workflows/docker-image.yml index dc1c778..73b5672 100644 --- a/.github/workflows/docker-image.yml +++ b/.github/workflows/docker-image.yml @@ -7,7 +7,7 @@ on: env: IMAGE_TAG: ${{ github.sha }} - REPOSITORY: ghcr.io/$GITHUB_REPOSITORY + REPOSITORY: ${"ghcr.io/"${GITHUB_REPOSITORY}} jobs: build: From 8af5a831424e1dbabeeedb6d2c078236880ae0ac Mon Sep 17 00:00:00 2001 From: Jerry Date: Wed, 21 Jun 2023 12:47:22 +0300 Subject: [PATCH 26/34] Update docker-image.yml --- .github/workflows/docker-image.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/docker-image.yml b/.github/workflows/docker-image.yml index 73b5672..fb3a87e 100644 --- a/.github/workflows/docker-image.yml +++ b/.github/workflows/docker-image.yml @@ -7,7 +7,7 @@ on: env: IMAGE_TAG: ${{ github.sha }} - REPOSITORY: ${"ghcr.io/"${GITHUB_REPOSITORY}} + REPOSITORY: "ghcr.io/${{GITHUB_REPOSITORY}}" jobs: build: From e1d3f332f93ebe528489fb96564aab98729f6269 Mon Sep 17 00:00:00 2001 From: Jerry Date: Wed, 21 Jun 2023 12:48:34 +0300 Subject: [PATCH 27/34] Update docker-image.yml --- .github/workflows/docker-image.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/docker-image.yml b/.github/workflows/docker-image.yml index fb3a87e..5a12e70 100644 --- a/.github/workflows/docker-image.yml +++ b/.github/workflows/docker-image.yml @@ -7,7 +7,7 @@ on: env: IMAGE_TAG: ${{ github.sha }} - REPOSITORY: "ghcr.io/${{GITHUB_REPOSITORY}}" + REPOSITORY: "ghcr.io/${{ GITHUB_REPOSITORY }}" jobs: build: From 4af7d98616be90be1ae1aa1c47f36724d604f0cf Mon Sep 17 00:00:00 2001 From: Jerry Date: Wed, 21 Jun 2023 12:53:36 +0300 Subject: [PATCH 28/34] Update docker-image.yml --- .github/workflows/docker-image.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/docker-image.yml b/.github/workflows/docker-image.yml index 5a12e70..3f35896 100644 --- a/.github/workflows/docker-image.yml +++ b/.github/workflows/docker-image.yml @@ -7,7 +7,7 @@ on: env: IMAGE_TAG: ${{ github.sha }} - REPOSITORY: "ghcr.io/${{ GITHUB_REPOSITORY }}" + REPOSITORY: ghcr.io/${{ github.repository }} jobs: build: From 6d2e4757707f73eb89bf6c510b33413276052a9a Mon Sep 17 00:00:00 2001 From: Jerry Date: Wed, 21 Jun 2023 13:09:24 +0300 Subject: [PATCH 29/34] Update docker-image.yml --- .github/workflows/docker-image.yml | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/.github/workflows/docker-image.yml b/.github/workflows/docker-image.yml index 3f35896..bcfc05e 100644 --- a/.github/workflows/docker-image.yml +++ b/.github/workflows/docker-image.yml @@ -6,8 +6,13 @@ on: types: [published] env: + shell: pwsh + run: | + "::set-output name=repository::$($env:GITHUB_REPOSITORY.ToLowerInvariant())" + + REPOSITORY: ghcr.io/${{ steps.lower-repo.outputs.repository }} + # REPOSITORY: ghcr.io/${{ github.repository }} IMAGE_TAG: ${{ github.sha }} - REPOSITORY: ghcr.io/${{ github.repository }} jobs: build: @@ -29,6 +34,6 @@ jobs: echo $IMAGE_TAG echo $REPOSITORY - docker build . --file Dockerfile --tag $REPOSITORY:$IMAGE_TAG + docker build . --tag $REPOSITORY:$IMAGE_TAG # docker push ghcr.io/dogstailfarmer/exchanges-wrapper:latest # docker push ghcr.io/dogstailfarmer/exchanges-wrapper:latest From cad8098138ee24600abe4252c046cef7218d43ed Mon Sep 17 00:00:00 2001 From: Jerry Date: Wed, 21 Jun 2023 13:15:17 +0300 Subject: [PATCH 30/34] Update docker-image.yml --- .github/workflows/docker-image.yml | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/.github/workflows/docker-image.yml b/.github/workflows/docker-image.yml index bcfc05e..24f87eb 100644 --- a/.github/workflows/docker-image.yml +++ b/.github/workflows/docker-image.yml @@ -5,19 +5,21 @@ on: release: types: [published] -env: - shell: pwsh - run: | - "::set-output name=repository::$($env:GITHUB_REPOSITORY.ToLowerInvariant())" - - REPOSITORY: ghcr.io/${{ steps.lower-repo.outputs.repository }} - # REPOSITORY: ghcr.io/${{ github.repository }} - IMAGE_TAG: ${{ github.sha }} - jobs: build: runs-on: ubuntu-latest steps: + + - id: lower-repo + shell: pwsh + run: | + "::set-output name=repository::$($env:GITHUB_REPOSITORY.ToLowerInvariant())" + + env: + REPOSITORY: ghcr.io/${{ steps.lower-repo.outputs.repository }} + # REPOSITORY: ghcr.io/${{ github.repository }} + IMAGE_TAG: ${{ github.sha }} + - name: Checkout uses: actions/checkout@v3 From d6be1d09cc91ad4d350ba1010c1e77341bcfabe6 Mon Sep 17 00:00:00 2001 From: Jerry Date: Wed, 21 Jun 2023 13:30:19 +0300 Subject: [PATCH 31/34] Update docker-image.yml --- .github/workflows/docker-image.yml | 30 ++++++++++++++---------------- 1 file changed, 14 insertions(+), 16 deletions(-) diff --git a/.github/workflows/docker-image.yml b/.github/workflows/docker-image.yml index 24f87eb..463f139 100644 --- a/.github/workflows/docker-image.yml +++ b/.github/workflows/docker-image.yml @@ -5,24 +5,26 @@ on: release: types: [published] + +# env: +# REPOSITORY: ghcr.io/${{ github.repository }} +# IMAGE_TAG: ${{ github.sha }} + jobs: build: runs-on: ubuntu-latest steps: - - - id: lower-repo - shell: pwsh - run: | - "::set-output name=repository::$($env:GITHUB_REPOSITORY.ToLowerInvariant())" - - env: - REPOSITORY: ghcr.io/${{ steps.lower-repo.outputs.repository }} - # REPOSITORY: ghcr.io/${{ github.repository }} - IMAGE_TAG: ${{ github.sha }} - - name: Checkout uses: actions/checkout@v3 + - name: PrepareReg Names + run: | + echo IMAGE_REPOSITORY=$(echo ${{ github.repository }} | tr '[:upper:]' '[:lower:]') >> $GITHUB_ENV + echo IMAGE_TAG=$(echo ${{ github.ref }} | tr '[:upper:]' '[:lower:]' | awk '{split($0,a,"/"); print a[3]}') >> $GITHUB_ENV + + echo $IMAGE_REPOSITORY + echo $IMAGE_TAG + - name: Login to GHCR uses: docker/login-action@v2 with: @@ -32,10 +34,6 @@ jobs: - name: Build and push run: | - - echo $IMAGE_TAG - echo $REPOSITORY - - docker build . --tag $REPOSITORY:$IMAGE_TAG + docker build . --tag $IMAGE_REPOSITORY:$IMAGE_TAG # docker push ghcr.io/dogstailfarmer/exchanges-wrapper:latest # docker push ghcr.io/dogstailfarmer/exchanges-wrapper:latest From 8475cab85fc305f7276808f41171e65fce79ed9e Mon Sep 17 00:00:00 2001 From: Jerry Date: Wed, 21 Jun 2023 14:00:20 +0300 Subject: [PATCH 32/34] Update docker-image.yml --- .github/workflows/docker-image.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/docker-image.yml b/.github/workflows/docker-image.yml index 463f139..f683a36 100644 --- a/.github/workflows/docker-image.yml +++ b/.github/workflows/docker-image.yml @@ -22,9 +22,11 @@ jobs: echo IMAGE_REPOSITORY=$(echo ${{ github.repository }} | tr '[:upper:]' '[:lower:]') >> $GITHUB_ENV echo IMAGE_TAG=$(echo ${{ github.ref }} | tr '[:upper:]' '[:lower:]' | awk '{split($0,a,"/"); print a[3]}') >> $GITHUB_ENV + - name: Check names + run: | echo $IMAGE_REPOSITORY echo $IMAGE_TAG - + - name: Login to GHCR uses: docker/login-action@v2 with: From b2eaa85e0e03e571e2fde7b32af0318a382fb159 Mon Sep 17 00:00:00 2001 From: Jerry Date: Wed, 21 Jun 2023 14:06:44 +0300 Subject: [PATCH 33/34] v1.0 --- .github/workflows/docker-image.yml | 15 +++------------ 1 file changed, 3 insertions(+), 12 deletions(-) diff --git a/.github/workflows/docker-image.yml b/.github/workflows/docker-image.yml index f683a36..2ea5a74 100644 --- a/.github/workflows/docker-image.yml +++ b/.github/workflows/docker-image.yml @@ -5,11 +5,6 @@ on: release: types: [published] - -# env: -# REPOSITORY: ghcr.io/${{ github.repository }} -# IMAGE_TAG: ${{ github.sha }} - jobs: build: runs-on: ubuntu-latest @@ -22,11 +17,6 @@ jobs: echo IMAGE_REPOSITORY=$(echo ${{ github.repository }} | tr '[:upper:]' '[:lower:]') >> $GITHUB_ENV echo IMAGE_TAG=$(echo ${{ github.ref }} | tr '[:upper:]' '[:lower:]' | awk '{split($0,a,"/"); print a[3]}') >> $GITHUB_ENV - - name: Check names - run: | - echo $IMAGE_REPOSITORY - echo $IMAGE_TAG - - name: Login to GHCR uses: docker/login-action@v2 with: @@ -37,5 +27,6 @@ jobs: - name: Build and push run: | docker build . --tag $IMAGE_REPOSITORY:$IMAGE_TAG - # docker push ghcr.io/dogstailfarmer/exchanges-wrapper:latest - # docker push ghcr.io/dogstailfarmer/exchanges-wrapper:latest + docker push $IMAGE_REPOSITORY:$IMAGE_TAG + docker build . --tag $IMAGE_REPOSITORY:latest + docker push $IMAGE_REPOSITORY:latest From 24104ee4d3932572789c8527a474e28528136973 Mon Sep 17 00:00:00 2001 From: Jerry Date: Wed, 21 Jun 2023 14:41:22 +0300 Subject: [PATCH 34/34] Create python-publish.yml --- .github/workflows/python-publish.yml | 40 ++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100644 .github/workflows/python-publish.yml diff --git a/.github/workflows/python-publish.yml b/.github/workflows/python-publish.yml new file mode 100644 index 0000000..355dde4 --- /dev/null +++ b/.github/workflows/python-publish.yml @@ -0,0 +1,40 @@ +# This workflow will upload a Python Package using Twine when a release is created +# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python#publishing-to-package-registries + +# This workflow uses actions that are not certified by GitHub. +# They are provided by a third-party and are governed by +# separate terms of service, privacy policy, and support +# documentation. + +name: Upload Python Package + +on: + workflow_dispatch: + release: + types: [published] + +permissions: + contents: read + +jobs: + deploy: + + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v3 + - name: Set up Python + uses: actions/setup-python@v3 + with: + python-version: '3.x' + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install build + - name: Build package + run: python -m build + - name: Publish package + uses: pypa/gh-action-pypi-publish@27b31702a0e7fc50959f5ad993c78deac1bdfc29 + with: + user: __token__ + password: ${{ secrets.PYPI_API_TOKEN }}