From dd71143ef7e7fc1e7459358bd0a70eb64bed78ae Mon Sep 17 00:00:00 2001 From: Jacob Woffenden Date: Mon, 8 Apr 2024 19:40:23 +0100 Subject: [PATCH] Switch to MoJ published action --- .../setup-container-structure-test/action.yml | 38 ------------------- .github/workflows/build-test.yml | 2 +- 2 files changed, 1 insertion(+), 39 deletions(-) delete mode 100644 .github/actions/setup-container-structure-test/action.yml diff --git a/.github/actions/setup-container-structure-test/action.yml b/.github/actions/setup-container-structure-test/action.yml deleted file mode 100644 index 7d001e4..0000000 --- a/.github/actions/setup-container-structure-test/action.yml +++ /dev/null @@ -1,38 +0,0 @@ ---- -name: Set Up Google Container Structure Test -description: This action installs Google's Container Structure Test tool. - -inputs: - version: - description: The version of Container Structure Test to install. - required: false - default: "latest" - -runs: - using: "composite" - steps: - - shell: bash - run: | - if [[ "$(uname -m)" == "x86_64" ]]; then - export architecture="amd64" - elif [[ "$(uname -m)" == "aarch64" ]]; then - export architecture="arm64" - else - echo "Unsupported architecture: $(uname -m)" - exit 1 - fi - - if [[ "${{ inputs.version }}" == "latest" ]]; then - export version="$(curl --silent https://api.github.com/repos/GoogleContainerTools/container-structure-test/releases/latest | jq -r '.tag_name')" - else - export version="${{ inputs.version }}" - fi - - mkdir --parents "${GITHUB_WORKSPACE}/.google-container-structure-test" - - curl --fail-with-body --location --silent "https://github.com/GoogleContainerTools/container-structure-test/releases/download/${version}/container-structure-test-linux-${architecture}" \ - --output "${GITHUB_WORKSPACE}/.google-container-structure-test/container-structure-test" - - chmod +x "${GITHUB_WORKSPACE}/.google-container-structure-test/container-structure-test" - - echo "${GITHUB_WORKSPACE}/.google-container-structure-test" >>"${GITHUB_PATH}" diff --git a/.github/workflows/build-test.yml b/.github/workflows/build-test.yml index c2d4e22..97162cf 100644 --- a/.github/workflows/build-test.yml +++ b/.github/workflows/build-test.yml @@ -21,7 +21,7 @@ jobs: - name: Set Up Container Structure Test id: setup_container_structure_test - uses: ./.github/actions/setup-container-structure-test + uses: ministryofjustice/github-actions/setup-container-structure-test@bdab1cff6d23336b6d5adc662fb57af72f0ae160 # v17.1.0 - name: Build and Test id: build_and_test