From be8d968b07cc9251442f1ec909a8dd06f643549c Mon Sep 17 00:00:00 2001 From: Yurii Kovalchuk <103324562+yumirkov@users.noreply.github.com> Date: Fri, 20 Sep 2024 19:05:52 +0300 Subject: [PATCH] ATOR-330 - Memory allocation (#88) --- .github/workflows/build.yml | 4 ++-- .github/workflows/dev-build-and-deploy.yml | 12 ++++++------ .github/workflows/live-build-and-deploy.yml | 10 +++++----- .github/workflows/stage-build-and-deploy.yml | 16 ++++++++-------- .gitignore | 3 +++ operations/anon-debian-repo.hcl | 2 +- 6 files changed, 25 insertions(+), 22 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 4a7c0b2804..5a0415d63a 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -25,8 +25,8 @@ jobs: - name: Build and push uses: ./.github/actions/build-and-push with: - docker-username: ${{ secrets.CR_USERNAME }} - docker-password: ${{ secrets.CR_PAT }} + docker-username: ${{ github.actor }} + docker-password: ${{ secrets.GITHUB_TOKEN }} docker-base-repo: ghcr.io/anyone-protocol/ator-protocol-dev-${{ matrix.platform.image-suffix }} docker-tag: latest-pr docker-platform: ${{ matrix.platform.name }} diff --git a/.github/workflows/dev-build-and-deploy.yml b/.github/workflows/dev-build-and-deploy.yml index 0eeb5f6358..ccc5410680 100644 --- a/.github/workflows/dev-build-and-deploy.yml +++ b/.github/workflows/dev-build-and-deploy.yml @@ -5,7 +5,7 @@ on: branches: - development workflow_dispatch: - + env: image-name: ghcr.io/anyone-protocol/ator-protocol-dev image-tag: ${{ github.sha }} @@ -31,8 +31,8 @@ jobs: - name: Build and push uses: ./.github/actions/build-and-push with: - docker-username: ${{ secrets.CR_USERNAME }} - docker-password: ${{ secrets.CR_PAT }} + docker-username: ${{ github.actor }} + docker-password: ${{ secrets.GITHUB_TOKEN }} docker-base-repo: ${{ env.image-name }}-${{ matrix.platform.image-suffix }} docker-tag: ${{ env.image-tag }} docker-platform: ${{ matrix.platform.name }} @@ -49,8 +49,8 @@ jobs: - name: Multiarch push uses: ./.github/actions/multiarch-push with: - docker-username: ${{ secrets.CR_USERNAME }} - docker-password: ${{ secrets.CR_PAT }} + docker-username: ${{ github.actor }} + docker-password: ${{ secrets.GITHUB_TOKEN }} docker-base-repo: ${{ env.image-name }} docker-tag: ${{ env.image-tag }} event-name: ${{ github.event_name }} @@ -61,7 +61,7 @@ jobs: steps: - name: Check out the repo uses: actions/checkout@v4 - - name: Deploy new version + - name: Deploy new version uses: ./.github/actions/deploy with: image-tag: ${{ env.image-tag }} diff --git a/.github/workflows/live-build-and-deploy.yml b/.github/workflows/live-build-and-deploy.yml index ef73cf126b..3d9e5ea4cf 100644 --- a/.github/workflows/live-build-and-deploy.yml +++ b/.github/workflows/live-build-and-deploy.yml @@ -35,8 +35,8 @@ jobs: - name: Build and push uses: ./.github/actions/build-and-push with: - docker-username: ${{ secrets.CR_USERNAME }} - docker-password: ${{ secrets.CR_PAT }} + docker-username: ${{ github.actor }} + docker-password: ${{ secrets.GITHUB_TOKEN }} docker-base-repo: ${{ env.image-name }}-${{ matrix.platform.image-suffix }} docker-tag: ${{ env.image-tag }} docker-platform: ${{ matrix.platform.name }} @@ -53,8 +53,8 @@ jobs: - name: Multiarch push uses: ./.github/actions/multiarch-push with: - docker-username: ${{ secrets.CR_USERNAME }} - docker-password: ${{ secrets.CR_PAT }} + docker-username: ${{ github.actor }} + docker-password: ${{ secrets.GITHUB_TOKEN }} docker-base-repo: ${{ env.image-name }} docker-tag: ${{ env.image-tag }} event-name: ${{ github.event_name }} @@ -66,7 +66,7 @@ jobs: steps: - name: Check out the repo uses: actions/checkout@v4 - - name: Deploy new version + - name: Deploy new version uses: ./.github/actions/deploy with: image-tag: ${{ env.image-tag }} diff --git a/.github/workflows/stage-build-and-deploy.yml b/.github/workflows/stage-build-and-deploy.yml index 6cd96ed9df..09bc6e67f9 100644 --- a/.github/workflows/stage-build-and-deploy.yml +++ b/.github/workflows/stage-build-and-deploy.yml @@ -1,11 +1,11 @@ -name: Stage Build Image and Deploy +name: Stage Build Image and Deploy on: push: branches: - - main + - main workflow_dispatch: - + env: image-name: ghcr.io/anyone-protocol/ator-protocol-stage image-tag: ${{ github.sha }} @@ -35,8 +35,8 @@ jobs: - name: Build and push uses: ./.github/actions/build-and-push with: - docker-username: ${{ secrets.CR_USERNAME }} - docker-password: ${{ secrets.CR_PAT }} + docker-username: ${{ github.actor }} + docker-password: ${{ secrets.GITHUB_TOKEN }} docker-base-repo: ${{ env.image-name }}-${{ matrix.platform.image-suffix }} docker-tag: ${{ env.image-tag }} docker-platform: ${{ matrix.platform.name }} @@ -53,8 +53,8 @@ jobs: - name: Multiarch push uses: ./.github/actions/multiarch-push with: - docker-username: ${{ secrets.CR_USERNAME }} - docker-password: ${{ secrets.CR_PAT }} + docker-username: ${{ github.actor }} + docker-password: ${{ secrets.GITHUB_TOKEN }} docker-base-repo: ${{ env.image-name }} docker-tag: ${{ env.image-tag }} event-name: ${{ github.event_name }} @@ -65,7 +65,7 @@ jobs: steps: - name: Check out the repo uses: actions/checkout@v4 - - name: Deploy new version + - name: Deploy new version uses: ./.github/actions/deploy with: image-tag: ${{ env.image-tag }} diff --git a/.gitignore b/.gitignore index f33ae90895..c30ac3238c 100644 --- a/.gitignore +++ b/.gitignore @@ -223,3 +223,6 @@ scripts/maint/geoip/geoip6 # /src/win32/ /src/win32/Makefile /src/win32/Makefile.in + +.idea +/ator-protocol.iml diff --git a/operations/anon-debian-repo.hcl b/operations/anon-debian-repo.hcl index ee37f15c21..2f14ee971c 100644 --- a/operations/anon-debian-repo.hcl +++ b/operations/anon-debian-repo.hcl @@ -54,7 +54,7 @@ job "anon-debian-repo" { resources { cpu = 256 - memory = 256 + memory = 512 } service {