From e99feb42227b2c2b9e0f42bccc30a3cd202d5f52 Mon Sep 17 00:00:00 2001 From: Hamza Khalid Date: Tue, 10 Dec 2024 16:11:29 +0500 Subject: [PATCH] merge main and update workflow deployment --- .github/workflows/ec2-deployment.yml | 15 ++++++++------- packages/ciphernode/Cargo.lock | 2 +- packages/ciphernode/config/Cargo.toml | 2 +- 3 files changed, 10 insertions(+), 9 deletions(-) diff --git a/.github/workflows/ec2-deployment.yml b/.github/workflows/ec2-deployment.yml index 612b1024..793b5c01 100644 --- a/.github/workflows/ec2-deployment.yml +++ b/.github/workflows/ec2-deployment.yml @@ -37,17 +37,19 @@ jobs: id: version run: echo "version=$(date +'%Y%m%d')-${GITHUB_SHA::8}" >> $GITHUB_OUTPUT - - name: Build image - run: | - docker build -t $IMAGE_NAME:${{ steps.version.outputs.version }} -f $DOCKERFILE_PATH . - - name: Log in to GitHub Container Registry - if: github.ref == 'refs/heads/release' uses: docker/login-action@v3 with: registry: ghcr.io username: ${{ github.actor }} - password: ${{ secrets.GITHUB_TOKEN }} + password: ${{ secrets.GITHUB_TOKEN }} + + - name: Build image + env: + IMAGE_TAG: ${{ steps.version.outputs.version }} + run: | + docker build -t $IMAGE_NAME:${{ steps.version.outputs.version }} -f $DOCKERFILE_PATH . + docker push $IMAGE_NAME:$IMAGE_TAG - name: Push to GHCR if: github.ref == 'refs/heads/release' @@ -55,7 +57,6 @@ jobs: IMAGE_TAG: ${{ steps.version.outputs.version }} run: | docker tag $IMAGE_NAME:$IMAGE_TAG $IMAGE_NAME:latest - docker push $IMAGE_NAME:$IMAGE_TAG docker push $IMAGE_NAME:latest deploy: diff --git a/packages/ciphernode/Cargo.lock b/packages/ciphernode/Cargo.lock index 017e2515..0684a617 100644 --- a/packages/ciphernode/Cargo.lock +++ b/packages/ciphernode/Cargo.lock @@ -1694,9 +1694,9 @@ dependencies = [ "dirs", "figment", "serde", - "url", "shellexpand", "tempfile", + "url", ] [[package]] diff --git a/packages/ciphernode/config/Cargo.toml b/packages/ciphernode/config/Cargo.toml index dd6442d7..e58c695f 100644 --- a/packages/ciphernode/config/Cargo.toml +++ b/packages/ciphernode/config/Cargo.toml @@ -10,8 +10,8 @@ serde = { workspace = true } figment = { workspace = true } alloy = { workspace = true } shellexpand = { workspace = true } +url = { workspace = true } [dev-dependencies] tempfile = { workspace = true } -url = { workspace = true }