Skip to content

Commit

Permalink
test if consition different than local test
Browse files Browse the repository at this point in the history
Signed-off-by: Jingwei Wang <jweiw@amazon.com>
  • Loading branch information
sky1122 committed Jan 28, 2025
1 parent 7e82e74 commit 7178fa5
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 5 deletions.
18 changes: 13 additions & 5 deletions .github/workflows/e2e-linux.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -152,24 +152,30 @@ jobs:
"${{ inputs.runner-type }}",
]
steps:
- name: Set output variables to check AL2
id: linux2
run: |
is_al2=${{ (startsWith(inputs.os, 'amazon') && inputs.version == '2' ) }}
echo "is_al2=$is_al2" >> $GITHUB_OUTPUT
- name: configure aws credentials
uses: aws-actions/configure-aws-credentials@e3dd6a429d7300a6a4c196c26e071d42e0343502 # v4.0.2
if: |
needs.test.outputs.has_creds == 'true'
steps.linux2.outputs.is_al2 == 'false'
&& needs.test.outputs.has_creds == 'true'
&& ${{ (startsWith(inputs.os, 'amazon')
&& inputs.version != '2' ) }}
&& github.event_name == 'pull_request'
&& github.event.action == 'closed'
&& github.event.pull_request.merged == true
with:
role-to-assume: ${{ secrets.ROLE }}
role-session-name: credhelper-test
aws-region: ${{ secrets.REGION }}
- name: download artifacts
uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4.1.08
if: |
needs.test.outputs.has_creds == 'true'
steps.linux2.outputs.is_al2 == 'false'
&& needs.test.outputs.has_creds == 'true'
&& ${{ (startsWith(inputs.os, 'amazon')
&& inputs.version != '2' ) }}
&& github.event_name == 'pull_request'
Expand All @@ -180,7 +186,8 @@ jobs:
path: linux-${{ inputs.version }}-${{ inputs.test-command }}-${{ inputs.arch }}-${{ github.run_id }}-${{ github.run_attempt }}-e2e-reports
- name: Display structure of downloaded files
if: |
needs.test.outputs.has_creds == 'true'
steps.linux2.outputs.is_al2 == 'false'
&& needs.test.outputs.has_creds == 'true'
&& ${{ (startsWith(inputs.os, 'amazon')
&& inputs.version != '2' ) }}
&& github.event_name == 'pull_request'
Expand All @@ -189,7 +196,8 @@ jobs:
run: ls -R linux-${{ inputs.version }}-${{ inputs.test-command }}-${{ inputs.arch }}-${{ github.run_id }}-${{ github.run_attempt }}-e2e-reports
- name: Check and upload e2e tests reports to s3 bucket
if: |
needs.test.outputs.has_creds == 'true'
steps.linux2.outputs.is_al2 == 'false'
&& needs.test.outputs.has_creds == 'true'
&& ${{ (startsWith(inputs.os, 'amazon')
&& inputs.version != '2' ) }}
&& github.event_name == 'pull_request'
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/e2e-macos.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,9 @@ jobs:
uses: aws-actions/configure-aws-credentials@e3dd6a429d7300a6a4c196c26e071d42e0343502 # v4.0.2
if: |
needs.test.outputs.has_creds == 'true'
&& github.event_name == 'pull_request'
&& github.event.action == 'closed'
&& github.event.pull_request.merged == true
with:
role-to-assume: ${{ secrets.ROLE }}
role-session-name: credhelper-test
Expand Down

0 comments on commit 7178fa5

Please sign in to comment.