From 3691e4fc6851df3cc77efbb6d9a37c7b06d80a5b Mon Sep 17 00:00:00 2001 From: guyrenny <127672145+guyrenny@users.noreply.github.com> Date: Tue, 8 Aug 2023 16:10:32 +0300 Subject: [PATCH] Update release.yaml --- .github/workflows/release.yaml | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 7bb8a576..2eea06b9 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -52,12 +52,10 @@ jobs: aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }} aws-region: ${{ env.AWS_DEFAULT_REGION }} - - name: Validate + - if: ${{ matrix.package != 'helper' }} + name: Validate working-directory: src/${{ matrix.package }} - run: | - if [ "${{ matrix.package }}" != "helper" ]; then - sam validate - fi + run: sam validate build: @@ -77,13 +75,14 @@ jobs: with: use-installer: true - - uses: aws-actions/configure-aws-credentials@v2 + - if: ${{ matrix.package != 'helper' }} + uses: aws-actions/configure-aws-credentials@v2 with: aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }} aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }} aws-region: ${{ env.AWS_DEFAULT_REGION }} - - if: ${{ matrix.package }} != 'helper' + - if: ${{ matrix.package != 'helper' }} name: Build working-directory: ./src/${{ matrix.package }} run: sam build --use-container @@ -98,7 +97,7 @@ jobs: --output-template-file packaged.yaml - name: Store - if: ${{ github.event_name == 'pull_request' && github.event.pull_request.merged == true }} + if: ${{ github.event_name == 'pull_request' && github.event.pull_request.merged == true && matrix.package != 'helper' }} uses: actions/upload-artifact@v3 with: name: ${{ matrix.package }}-packaged.yaml @@ -106,7 +105,7 @@ jobs: publish: name: Publish - if: ${{ github.event_name == 'pull_request' && github.event.pull_request.merged == true }} + if: ${{ github.event_name == 'pull_request' && github.event.pull_request.merged == true && matrix.package != 'helper'}} runs-on: ubuntu-latest env: AWS_SERVERLESS_BUCKET: coralogix-serverless-repo @@ -122,23 +121,24 @@ jobs: with: use-installer: true - - if: ${{ matrix.package }} != 'helper' + - if: ${{ matrix.package != 'helper' }} name: Download uses: actions/download-artifact@v3 with: name: ${{ matrix.package }}-packaged.yaml - - - uses: aws-actions/configure-aws-credentials@v2 + + - if: ${{ matrix.package != 'helper' }} + uses: aws-actions/configure-aws-credentials@v2 with: aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }} aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }} aws-region: ${{ env.AWS_DEFAULT_REGION }} - - if: ${{ matrix.package }} != 'helper' + - if: ${{ matrix.package != 'helper' }} name: Publish run: sam publish --template packaged.yaml - - if: ${{ matrix.package }} != 'helper' + - if: ${{ matrix.package != 'helper' }} name: Store run: | aws s3 cp \