From f694dd64db63e235de5dc4b7d084306e86089af7 Mon Sep 17 00:00:00 2001 From: Nam Hoang Date: Sat, 16 Sep 2023 10:52:26 +0700 Subject: [PATCH] chore: deploy un Signed-off-by: Nam Hoang --- .github/workflows/build-and-deploy-agent.yml | 11 ++++++++--- .github/workflows/deploy-to-s3.yml | 7 ++++--- 2 files changed, 12 insertions(+), 6 deletions(-) diff --git a/.github/workflows/build-and-deploy-agent.yml b/.github/workflows/build-and-deploy-agent.yml index f79c7ff1..e4e1496c 100644 --- a/.github/workflows/build-and-deploy-agent.yml +++ b/.github/workflows/build-and-deploy-agent.yml @@ -4,11 +4,12 @@ on: push: branches: - dev + - deploy-un tags: - '*' env: - environment: ${{ (github.ref == 'refs/heads/dev' && 'dev') || (startsWith(github.ref, 'refs/tags/v') && 'UN') }} + environment: ${{ (github.ref == 'refs/heads/dev' && 'dev') || (github.ref == 'refs/heads/deploy-un' && 'UN') || (startsWith(github.ref, 'refs/tags/v') && 'UN') }} jobs: install_and_build: @@ -20,7 +21,7 @@ jobs: env: CI: false - environment: ${{ (github.ref == 'refs/heads/dev' && 'dev') || (startsWith(github.ref, 'refs/tags/v') && 'UN') }} + environment: ${{ (github.ref == 'refs/heads/dev' && 'dev') || (github.ref == 'refs/heads/deploy-un' && 'UN') || (startsWith(github.ref, 'refs/tags/v') && 'UN') }} steps: - name: Checkout repository @@ -30,6 +31,10 @@ jobs: run: | sudo apt-get -q install -y python3-pip pip3 install awscli --upgrade --user + + - name: Log + run: | + echo ${{ env.environment }} - name: Configure AWS Credentials uses: aws-actions/configure-aws-credentials@v3 @@ -68,7 +73,7 @@ jobs: permissions: id-token: write - environment: ${{ (github.ref == 'refs/heads/dev' && 'dev') || (startsWith(github.ref, 'refs/tags/v') && 'UN') }} + environment: ${{ (github.ref == 'refs/heads/dev' && 'dev') || (github.ref == 'refs/heads/deploy-un' && 'UN') || (startsWith(github.ref, 'refs/tags/v') && 'UN') }} steps: - name: Checkout repository diff --git a/.github/workflows/deploy-to-s3.yml b/.github/workflows/deploy-to-s3.yml index f2f0c2df..9df753f6 100644 --- a/.github/workflows/deploy-to-s3.yml +++ b/.github/workflows/deploy-to-s3.yml @@ -4,11 +4,12 @@ on: push: branches: - dev + - deploy-un tags: - '*' env: - environment: ${{ (github.ref == 'refs/heads/dev' && 'dev') || (startsWith(github.ref, 'refs/tags/v') && 'UN') }} + environment: ${{ (github.ref == 'refs/heads/dev' && 'dev') || (github.ref == 'refs/heads/deploy-un' && 'UN') || (startsWith(github.ref, 'refs/tags/v') && 'UN') }} jobs: install_and_build: @@ -17,7 +18,7 @@ jobs: env: CI: false - environment: ${{ (github.ref == 'refs/heads/dev' && 'dev') || (startsWith(github.ref, 'refs/tags/v') && 'UN') }} + environment: ${{ (github.ref == 'refs/heads/dev' && 'dev') || (github.ref == 'refs/heads/deploy-un' && 'UN') || (startsWith(github.ref, 'refs/tags/v') && 'UN') }} steps: - name: Checkout repository @@ -71,7 +72,7 @@ jobs: permissions: id-token: write - environment: ${{ (github.ref == 'refs/heads/dev' && 'dev') || (startsWith(github.ref, 'refs/tags/v') && 'UN') }} + environment: ${{ (github.ref == 'refs/heads/dev' && 'dev') || (github.ref == 'refs/heads/deploy-un' && 'UN') || (startsWith(github.ref, 'refs/tags/v') && 'UN') }} steps: - name: Checkout repository