Skip to content

Commit

Permalink
.
Browse files Browse the repository at this point in the history
  • Loading branch information
Sandhya1874 committed Oct 8, 2024
1 parent ce5a3db commit 8b6afff
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 18 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -25,14 +25,14 @@ inputs:
description: App version
required: true
type: string
# docker_registry_username:
# description: Docker registry username
# required: true
# type: string
# docker_registry_token:
# description: Docker registry token
# required: true
# type: string
HMPPS_QUAYIO_USER:
description: Docker registry username
required: false
type: string
HMPPS_QUAYIO_TOKEN:
description: Docker registry token
required: false
type: string

# secrets:
# HMPPS_QUAYIO_USER:
Expand All @@ -46,13 +46,13 @@ runs:
- uses: actions/checkout@v4
- uses: docker/setup-qemu-action@v2
- uses: docker/setup-buildx-action@v2
# - name: Docker login if Docker registry is quay.io
# if: ${{ inputs.docker_registry == 'quay.io' }}
# uses: docker/login-action@v2
# with:
# registry: ${{ inputs.docker_registry }}
# username: ${{ secrets.HMPPS_QUAYIO_USER }}
# password: ${{ secrets.HMPPS_QUAYIO_TOKEN }}
- name: Docker login if Docker registry is quay.io
if: ${{ inputs.docker_registry == 'quay.io' }}
uses: docker/login-action@v2
with:
registry: ${{ inputs.docker_registry }}
username: ${{ inputs.HMPPS_QUAYIO_USER }}
password: ${{ inputs.HMPPS_QUAYIO_TOKEN }}

- name: Docker login if Docker registry is ghcr.io
if: ${{ inputs.docker_registry == 'ghcr.io' }}
Expand All @@ -72,8 +72,8 @@ runs:
provenance: false
build-args: |
"BUILD_NUMBER=${{ inputs.app_version }}"
"GIT_REF=$${{ github.head_ref }}"
"GIT_BRANCH=$${{ github.ref_name }}"
"GIT_REF=${{ github.head_ref }}"
"GIT_BRANCH=${{ github.ref_name }}"
tags: |
${{ inputs.docker_registry}}/${{ inputs.registry_org }}/${{ github.event.repository.name }}:latest
${{ inputs.docker_registry}}/${{ inputs.registry_org }}/${{ github.event.repository.name }}:${{ inputs.app_version }}
3 changes: 2 additions & 1 deletion .github/workflows/build_multiplatform_docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,6 @@ jobs:
push: ${{ inputs.push }}
app_version: ${{ needs.create_app_version.outputs.version }}


- uses: ministryofjustice/hmpps-github-actions/.github/actions/build-test-and-deploy/build_multiplatform_docker@feat/HEAT-344-share-app-version-across-jobs
if: ${{ inputs.docker_registry == 'quay.io' }}
with:
Expand All @@ -67,6 +66,8 @@ jobs:
additional_docker_tag: ${{ inputs.additional_docker_tag }}
push: ${{ inputs.push }}
app_version: ${{ needs.create_app_version.outputs.version }}
HMPPS_QUAYIO_USER: ${{ secrets.HMPPS_QUAYIO_USER }}
HMPPS_QUAYIO_TOKEN: ${{ secrets.HMPPS_QUAYIO_TOKEN}}



0 comments on commit 8b6afff

Please sign in to comment.