Skip to content

Commit

Permalink
rewrite workflow to use outputs
Browse files Browse the repository at this point in the history
  • Loading branch information
FleetAdmiralButter committed Sep 22, 2023
1 parent 2f147bb commit f1fd856
Showing 1 changed file with 16 additions and 11 deletions.
27 changes: 16 additions & 11 deletions .github/workflows/e2e_be_core.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,29 +24,34 @@ on:
default: migration

jobs:
e2e_be_core:
name: e2e_be_core
check_pr:
name: check_pr
runs-on: biggy
container:
image: docker://sdptestautomation/e2e:${{ inputs.tag }}
credentials:
username: ${{ secrets.E2E_DOCKERHUB_USERNAME }}
password: ${{ secrets.E2E_DOCKERHUB_PASSWORD }}
outputs:
skip_pr: ${{ steps.check-pr.outputs.SKIP_PR }}
steps:
- name: Check if it's PR env backend
id: check-pr
run: |
PR_ENV_REGEX=".*.pr-"
if [[ $(expr match "${{ inputs.be_url }}" $PR_ENV_REGEX) != 0 ]]; then
echo 'export SKIP_PR=" and not @skip-pr"' >> $GITHUB_ENV
echo 'SKIP_PR=" and not @skip-pr"' >> $GITHUB_OUTPUT
echo "PR env detected - adding @skip-pr tag to skip tests"
else
echo 'export SKIP_PR=""' >> $GITHUB_ENV
echo 'SKIP_PR=""' >> $GITHUB_OUTPUT
echo "PR env not detected"
fi
- name: Run E2E BE
uses: dpc-sdp/github-actions/.github/workflows/run_e2e_be.yml@dev-tim
with:
tags: "(@core) and @regression${SKIP_PR}"
be_url: ${{ inputs.be_url }}
project: ${{ inputs.project }}
browser: ${{ inputs.browser }}
e2e_be_core:
name: Run E2E BE
secrets: inherit
uses: dpc-sdp/github-actions/.github/workflows/run_e2e_be.yml@dev-tim
with:
tags: "(@core) and @regression${{ needs.check_pr.outputs.skip_pr }}"
be_url: ${{ inputs.be_url }}
project: ${{ inputs.project }}
browser: ${{ inputs.browser }}

0 comments on commit f1fd856

Please sign in to comment.