Switch to shared repo and fail check #185
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
name: test examples | |
on: | |
pull_request: | |
types: ['opened', 'reopened', 'synchronize'] | |
merge_group: | |
workflow_dispatch: | |
jobs: | |
check: | |
name: Check for Fork | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checking for Fork | |
shell: pwsh | |
run: | | |
$isFork = "${{ github.event.pull_request.head.repo.fork }}" | |
if($isFork -eq "true") { | |
echo "::warning::This workflow is disabled for forked repositories. Please follow the release branch process if end to end tests are required. https://azure.github.io/Azure-Verified-Modules/contributing/terraform/terraform-contribution-flow/#5-create-a-pull-request-to-the-upstream-repository" | |
echo "### WARNING: This workflow is disabled for forked repositories. Please follow the [release branch process](https://azure.github.io/Azure-Verified-Modules/contributing/terraform/terraform-contribution-flow/#5-create-a-pull-request-to-the-upstream-repository) if end to end tests are required." >> $env:GITHUB_STEP_SUMMARY | |
exit 1 | |
} else { | |
echo "This is not a forked repository. Proceeding with the workflow." | |
} | |
run-e2e-tests: | |
if: github.event.repository.name != 'terraform-azurerm-avm-template' && github.event.pull_request.head.repo.fork == false | |
uses: Azure/Azure-Verified-Modules-Workflows/.github/workflows/terraform-e2e-test-examples.yml@49fff3556b57f4163edcc145b64d3929c55fe49b | |
name: end to end | |
secrets: inherit | |
permissions: | |
id-token: write | |
contents: read | |