From e512a9948b0ff1412c8af8d0e78430f21481e36f Mon Sep 17 00:00:00 2001 From: 0marperez <60363173+0marperez@users.noreply.github.com> Date: Mon, 22 Apr 2024 15:07:59 -0400 Subject: [PATCH] Update codebuild-ci.yml --- .github/workflows/codebuild-ci.yml | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/.github/workflows/codebuild-ci.yml b/.github/workflows/codebuild-ci.yml index c17b6d8afa9..b6043d35179 100644 --- a/.github/workflows/codebuild-ci.yml +++ b/.github/workflows/codebuild-ci.yml @@ -37,7 +37,7 @@ concurrency: jobs: e2e-tests: - if: ${{ github.event_name }} == 'pull_request' || ${{ github.event_name }} == 'workflow_dispatch' + if: github.event_name == 'pull_request' || github.event_name == 'workflow_dispatch' runs-on: ubuntu-latest steps: - name: Verify PRs are not running malicious code @@ -67,7 +67,7 @@ jobs: fi service-check-batch-and-artifact-size-metrics: - if: ${{ github.event_name }} == 'pull_request' || ${{ github.event_name }} == 'workflow_dispatch' + if: github.event_name == 'pull_request' || github.event_name == 'workflow_dispatch' runs-on: ubuntu-latest steps: - name: Verify PRs are not running malicious code @@ -116,7 +116,7 @@ jobs: repository(owner:"${context.repo.owner}", name:"${context.repo.repo}"){ pullRequest(number: ${context.issue.number}) { id - comments(last:200) { + comments(last:100) { nodes { id body @@ -134,7 +134,7 @@ jobs: const comments = response.repository.pullRequest.comments.nodes for (const i in comments) { - if (comments[i].author.login == 'github-actions' && !comments[i].isMinimized && comments[i].body.startsWith('Affected Artifacts') { + if (comments[i].author.login == 'github-actions' && !comments[i].isMinimized && comments[i].body.startsWith('Affected Artifacts')) { const hideComment = `mutation { minimizeComment(input:{subjectId:"${comments[i].id}", classifier:OUTDATED}){ @@ -161,14 +161,14 @@ jobs: - name: Evaluate Result if: ${{ !contains(github.event.pull_request.labels.*.name, 'acknowledge-artifact-size-increase') }} run: | - cat has-significant-change.txt | grep true - if [ $? = 0 ]; then + cd build/reports/metrics + cat has-significant-change.txt | grep false || { echo An artifact increased in size by more than allowed or a new artifact was created. exit 1 - fi + } release-artifact-size-metrics: - if: ${{ github.event_name }} == 'release' + if: github.event_name == 'release' runs-on: ubuntu-latest steps: - name: Checkout sources