Skip to content

Commit bbd7f8e

Browse files
committed
download script
1 parent b059f46 commit bbd7f8e

File tree

1 file changed

+14
-24
lines changed

1 file changed

+14
-24
lines changed

.github/workflows/quality-checks.yml

Lines changed: 14 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,11 @@ on:
3737
type: boolean
3838
description: "If true, the action will also tag the dev container image as 'latest' in ECR."
3939
required: true
40+
check_ecr_image_scan_results_script_tag:
41+
type: string
42+
description: "The tag to download check_ecr_image_scan_results.sh script."
43+
required: false
44+
default: "dev_container_build"
4045
jobs:
4146
quality_checks:
4247
runs-on: ubuntu-22.04
@@ -354,15 +359,10 @@ jobs:
354359
with:
355360
fetch-depth: 0
356361

357-
- name: Checkout .github folder from workflow repo
358-
uses: actions/checkout@v5
359-
with:
360-
repository: ${{ github.action_repository }}
361-
ref: ${{ github.action_ref }}
362-
path: .workflow-github
363-
sparse-checkout: |
364-
.github/scripts/check_ecr_image_scan_results.sh
365-
362+
- name: Download check_ecr_image_scan_results.sh script
363+
run: |
364+
curl -L https://raw.githubusercontent.com/NHSDigital/eps-workflow-quality-checks/refs/heads/${{inputs.check_ecr_image_scan_results_script_tag}}/.github/scripts/check_ecr_image_scan_results.sh -o check_ecr_image_scan_results.sh
365+
chmod +x check_ecr_image_scan_results.sh
366366
- name: Build dev container
367367
run: |
368368
docker build -f .devcontainer/Dockerfile -t dev-container-image .
@@ -395,10 +395,7 @@ jobs:
395395
REPOSITORY_NAME: ${{ inputs.dev_container_ecr }}
396396
IMAGE_TAG: ${{ inputs.dev_container_image_tag }}-amd64
397397
ACCOUNT_ID: ${{ steps.retrieve-deploy-account-id.outputs.account_id }}
398-
working-directory: .workflow-github/
399398
run: |
400-
ls -la .
401-
# Wait a moment for ECR to process the new manifest
402399
sleep 30
403400
./.github/scripts/check_ecr_image_scan_results.sh
404401
@@ -412,14 +409,10 @@ jobs:
412409
with:
413410
fetch-depth: 0
414411

415-
- name: Checkout .github folder from workflow repo
416-
uses: actions/checkout@v5
417-
with:
418-
repository: ${{ github.action_repository }}
419-
ref: ${{ github.action_ref }}
420-
path: .workflow-github
421-
sparse-checkout: |
422-
.github/scripts/check_ecr_image_scan_results.sh
412+
- name: Download check_ecr_image_scan_results.sh script
413+
run: |
414+
curl -L https://raw.githubusercontent.com/NHSDigital/eps-workflow-quality-checks/refs/heads/${{inputs.check_ecr_image_scan_results_script_tag}}/.github/scripts/check_ecr_image_scan_results.sh -o check_ecr_image_scan_results.sh
415+
chmod +x check_ecr_image_scan_results.sh
423416
424417
- name: Build dev container
425418
run: |
@@ -453,13 +446,10 @@ jobs:
453446
REPOSITORY_NAME: ${{ inputs.dev_container_ecr }}
454447
IMAGE_TAG: ${{ inputs.dev_container_image_tag }}-arm64
455448
ACCOUNT_ID: ${{ steps.retrieve-deploy-account-id.outputs.account_id }}
456-
working-directory: .workflow-github/
457449
run: |
458-
# List files recursively first
459-
ls -la .
460450
# Wait a moment for ECR to process the new manifest
461451
sleep 30
462-
./.github/scripts/check_ecr_image_scan_results.sh
452+
./check_ecr_image_scan_results.sh
463453
464454
create_multi_arch_manifest:
465455
permissions:

0 commit comments

Comments
 (0)