From 780ce39db38e889d2d22d3010a644644af762e79 Mon Sep 17 00:00:00 2001 From: sandhya1874 Date: Tue, 8 Oct 2024 22:17:54 +0100 Subject: [PATCH] . --- ...m_docker.yml => build-test-and-deploy.yml} | 0 .github/workflows/build_test_deploy.yml | 70 ------------------- 2 files changed, 70 deletions(-) rename .github/workflows/{build_multiplatform_docker.yml => build-test-and-deploy.yml} (100%) delete mode 100644 .github/workflows/build_test_deploy.yml diff --git a/.github/workflows/build_multiplatform_docker.yml b/.github/workflows/build-test-and-deploy.yml similarity index 100% rename from .github/workflows/build_multiplatform_docker.yml rename to .github/workflows/build-test-and-deploy.yml diff --git a/.github/workflows/build_test_deploy.yml b/.github/workflows/build_test_deploy.yml deleted file mode 100644 index e116c8a..0000000 --- a/.github/workflows/build_test_deploy.yml +++ /dev/null @@ -1,70 +0,0 @@ -name: Build multiplatform docker image & push to registry. - -on: - workflow_call: - inputs: - docker_registry: - description: Docker registry - required: true - type: string - registry_org: - description: Docker registry organisation - required: true - type: string - additional_docker_tag: - description: Additional docker tag that can be used to specify stable tags - required: false - type: string - push: - description: Push docker image to registry flag - required: true - type: boolean - -permissions: - contents: read - packages: write - -jobs: - create_app_version: - runs-on: ubuntu-latest - outputs: - version: ${{ steps.create_app_version.outputs.version }} - steps: - - name: Set version - id: create_app_version - run: | - version=$(date '+%Y-%m-%d').${{ github.run_number }}.$(echo ${{ github.sha }} | cut -c1-7) - echo "version=$version" | tee -a "$GITHUB_OUTPUT" - - multiplatform_docker_build: - name: Build docker image - needs: [ create_app_version ] - runs-on: ubuntu-latest - steps: - - uses: ministryofjustice/hmpps-github-actions/.github/actions/build-test-and-deploy/build_docker@feat/HEAT-344-share-app-version-across-jobs - if: ${{ inputs.docker_registry == 'ghcr.io' }} - with: - repository_name: ${{ github.event.repository.name }} - docker_registry: ${{ inputs.docker_registry }} - registry_org: ${{ inputs.registry_org }} - additional_docker_tag: ${{ inputs.additional_docker_tag }} - push: ${{ inputs.push }} - app_version: ${{ needs.create_app_version.outputs.version }} - docker_registry_username: ${{ secrets.HMPPS_QUAYIO_USER }} - docker_registry_token: ${{ secrets.HMPPS_QUAYIO_TOKEN }} - git_head_ref: ${{ github.head_ref }} - git_ref_name: ${{ github.ref_name }}" - - - uses: ministryofjustice/hmpps-github-actions/.github/actions/build-test-and-deploy/build_docker@feat/HEAT-344-share-app-version-across-jobs - if: ${{ inputs.docker_registry == 'quay.io' }} - with: - repository_name: ${{ github.event.repository.name }} - docker_registry: ${{ inputs.docker_registry }} - registry_org: ${{ inputs.registry_org }} - additional_docker_tag: ${{ inputs.additional_docker_tag }} - push: ${{ inputs.push }} - app_version: ${{ needs.create_app_version.outputs.version }} - docker_registry_username: ${{ secrets.HMPPS_QUAYIO_USER }} - docker_registry_token: ${{ secrets.HMPPS_QUAYIO_TOKEN }} - git_head_ref: ${{ github.head_ref }} - git_ref_name: ${{ github.ref_name }}"