File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 6767 runs-on : ubuntu-22.04
6868 environment : ${{ inputs.environment }}
6969 steps :
70- - name : Verify caller repository
71- run : |
72- ALLOWED_REPOS=("NHSDigital/eligibility-signposting-api")
73- CALLER_REPO="${{ github.repository }}"
74-
75- # If triggered by workflow_call, the calling repo is in github.repository
76- # If triggered manually, it's this repo itself which is allowed
77- if [[ "${{ github.event_name }}" == "workflow_call" ]]; then
78- CALLER_REPO="${{ github.event.workflow_run.repository.full_name || github.repository }}"
79- fi
80-
81- ALLOWED=false
82- for repo in "${ALLOWED_REPOS[@]}"; do
83- if [[ "$CALLER_REPO" == "$repo" ]]; then
84- ALLOWED=true
85- break
86- fi
87- done
88-
89- if [[ "$ALLOWED" == "false" && "${{ github.event_name }}" == "workflow_call" ]]; then
90- echo "Error: Repository $CALLER_REPO is not allowed to trigger this workflow"
91- exit 1
92- fi
93-
94- echo "Workflow triggered by allowed repository: $CALLER_REPO"
95-
9670 - name : show_input_parameters
9771 env :
9872 tags : ${{ inputs.tags }}
12397 echo run identifier "$ID"-"$ENV" >> "$GITHUB_STEP_SUMMARY"
12498
12599 - name : Checkout
126- uses : actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5
100+ uses : actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd
127101 with :
102+ repository : NHSDigital/eligibility-signposting-api-regression-tests
128103 ref : ${{ inputs.github_tag }}
129104
130105 # using git commit sha for version of action to ensure we have stable version
You can’t perform that action at this time.
0 commit comments