diff --git a/.github/workflows/build-and-deploy-agent.yml b/.github/workflows/build-and-deploy-agent.yml index a0483a92..af3700d3 100644 --- a/.github/workflows/build-and-deploy-agent.yml +++ b/.github/workflows/build-and-deploy-agent.yml @@ -3,6 +3,7 @@ name: Build and Deploy Agent on: push: branches: + - dev - next jobs: @@ -15,6 +16,8 @@ jobs: env: CI: false + environment: ${{ (github.ref == 'refs/heads/dev' && 'dev') || (github.ref == 'refs/heads/next' && 'UN') }} + steps: - name: Checkout repository uses: actions/checkout@v3 @@ -25,7 +28,7 @@ jobs: pip3 install awscli --upgrade --user - name: Configure AWS Credentials - uses: aws-actions/configure-aws-credentials@v2 + uses: aws-actions/configure-aws-credentials@v3 with: role-to-assume: ${{ secrets.AWS_ROLE_GITHUB_ACTION_ARN }} aws-region: ${{ secrets.AWS_REGION }} @@ -47,6 +50,8 @@ jobs: permissions: id-token: write + environment: ${{ (github.ref == 'refs/heads/dev' && 'dev') || (github.ref == 'refs/heads/next' && 'UN') }} + steps: - name: Checkout repository uses: actions/checkout@v3 @@ -57,7 +62,7 @@ jobs: pip3 install awscli --upgrade --user - name: Configure AWS Credentials - uses: aws-actions/configure-aws-credentials@v2 + uses: aws-actions/configure-aws-credentials@v3 with: role-to-assume: ${{ secrets.AWS_ROLE_GITHUB_ACTION_ARN }} aws-region: ${{ secrets.AWS_REGION }} diff --git a/.github/workflows/deploy-to-s3.yml b/.github/workflows/deploy-to-s3.yml index a2ae97b8..18f2f1b1 100644 --- a/.github/workflows/deploy-to-s3.yml +++ b/.github/workflows/deploy-to-s3.yml @@ -3,6 +3,7 @@ name: Deploy to S3 on: push: branches: + - dev - next jobs: @@ -12,13 +13,15 @@ jobs: env: CI: false + environment: ${{ (github.ref == 'refs/heads/dev' && 'dev') || (github.ref == 'refs/heads/next' && 'UN') }} + steps: - name: Checkout repository uses: actions/checkout@v3 - name: Cache dependencies id: cache - uses: actions/cache@v2 + uses: actions/cache@v3 with: path: ~/.pnpm-store key: ${{ runner.os }}-pnpm-${{ hashFiles('**/pnpm-lock.yaml') }} @@ -63,6 +66,8 @@ jobs: permissions: id-token: write + environment: ${{ (github.ref == 'refs/heads/dev' && 'dev') || (github.ref == 'refs/heads/next' && 'UN') }} + steps: - name: Checkout repository uses: actions/checkout@v3 @@ -79,7 +84,7 @@ jobs: pip3 install awscli --upgrade --user - name: Configure AWS Credentials - uses: aws-actions/configure-aws-credentials@v2 + uses: aws-actions/configure-aws-credentials@v3 with: role-to-assume: ${{ secrets.AWS_ROLE_GITHUB_ACTION_ARN }} aws-region: ${{ secrets.AWS_REGION }}