Skip to content

Commit

Permalink
Remove warning and add check summary
Browse files Browse the repository at this point in the history
  • Loading branch information
jaredfholgate committed Sep 13, 2024
1 parent bd7ffa6 commit ca0c51d
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 14 deletions.
13 changes: 8 additions & 5 deletions .github/workflows/e2e.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,18 @@
workflow_dispatch:

jobs:
warning:
check:
if: github.event.pull_request.head.repo.fork == true
runs-on: ubuntu-latest
steps:
- name: Warning - Cannot run from fork
shell: bash
- name: Checking for Fork
shell: pwsh
run: |
echo "WARNING: This workflow cannot be run from a Fork. Please follow the release branch process if you need to run end to end tests."
$isFork = $${{ github.event.pull_request.head.repo.fork }}
if($isFork) {
echo "### WARNING: This workflow is disabled for forked repositories. Please follow the release branch process if end to end tests are required." >> $GITHUB_STEP_SUMMARY
}
run-e2e-tests:
if: github.event.repository.name != 'terraform-azurerm-avm-template' && github.event.pull_request.head.repo.fork == false
uses: Azure/terraform-azurerm-avm-template/.github/workflows/test-examples-template.yml@main
Expand Down
9 changes: 0 additions & 9 deletions .github/workflows/test-examples-template.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,6 @@ on:
workflow_call:

jobs:
warning:
if: github.event.pull_request.head.repo.fork == true
runs-on: ubuntu-latest
steps:
- name: Warning - Cannot run from fork
shell: bash
run: |
echo "WARNING: This workflow cannot be run from a Fork. Please follow the release branch process if you need to run end to end tests."
getexamples:
if: github.event.repository.name != 'terraform-azurerm-avm-template' && github.event.pull_request.head.repo.fork == false
runs-on: ubuntu-latest
Expand Down

0 comments on commit ca0c51d

Please sign in to comment.