Skip to content

Commit

Permalink
Added working path
Browse files Browse the repository at this point in the history
  • Loading branch information
PTaladay committed Mar 29, 2024
1 parent 3f82401 commit 027772f
Show file tree
Hide file tree
Showing 2 changed files with 59 additions and 5 deletions.
36 changes: 36 additions & 0 deletions .github/actions/docker-add-tag/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: Docker Add Main tag
description: 'Adds the main tag to the images for all supported FHIR versions'

inputs:
sourceTag:
description: 'The tag to apply to the images'
required: true
targetTag:
description: 'The tag to apply to the images'
required: true
fhirSchemaVersion:
description: 'The FHIR schema version to package'
required: true
azureContainerRegistry:
description: 'The Azure Container Registry to push the images to'
required: true

runs:
using: 'composite'
steps:
- name: Azure Login
uses: azure/login@v2
with:
client-id: ${{secrets.AZURE_CLIENT_ID}}
subscription-id: ${{secrets.AZURE_SUBSCRIPTION_ID}}
tenant-id: ${{secrets.AZURE_TENANT_ID}}
enable-AzPSSession: true
- name: Add Tag to Docker Images
shell: bash
run: |
az acr login -n ${{inputs.azureContainerRegistry}}
sourceImage="${{inputs.azureContainerRegistry}}/${{inputs.fhirSchemaVersion}}_fhir-server:${{inputs.sourceTag}}"
targetImage="${{inputs.azureContainerRegistry}}/${{inputs.fhirSchemaVersion}}_fhir-server:${{inputs.targetTag}}"
docker pull $sourceImage
docker tag $sourceImage $targetImage
docker push $targetImage
28 changes: 23 additions & 5 deletions .github/workflows/fhir-oss-ci-pipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -105,11 +105,6 @@ jobs:
# chmod +x $RUNNER_TEMP/sbom-tool
# $RUNNER_TEMP/sbom-tool generate -b . -bc . -V Verbose -ps "Organization: Microsoft" -pv ${{needs.setup.outputs.majorMinorPatch}} -pn ${{needs.setup.outputs.informationalVersion}}

# - name: Docker Build
# uses: ./.github/actions/docker-build
# with:
# assemblySemFileVer: ${{needs.setup.outputs.semVer}}

- name: Upload a Build Artifact
uses: actions/upload-artifact@v4
with:
Expand All @@ -133,6 +128,7 @@ jobs:
6.x
8.x
- name: Nuget Restore
working-directory: ${{github.workspace}}/fhirserver/fhirserver
shell: bash
run: dotnet restore --verbosity detailed
- name: Download Build Artifacts from Job Cache
Expand All @@ -147,11 +143,33 @@ jobs:
outputPath: ${{env.outputPath}}
buildConfiguration: ${{env.buildConfiguration}}
semVer: ${{needs.setup.outputs.semVer}}
# - name: Docker Build
# uses: ./.github/actions/docker-build
# with:
# assemblySemFileVer: ${{needs.setup.outputs.semVer}}
# runIntegrationTests:
# runs-on: ubuntu-latest
# needs : buildAndUnitTest
# steps:
# - name: Checkout
# uses: actions/checkout@v4
# with:
# fetch-depth: 0
# - name: Download Build Artifact for Testing
# uses: actions/download-artifact@v4
# with:
# path: artifacts
# - name: Install Latest .Net SDK
# uses: actions/setup-dotnet@v4
# with:
# global-json-file: 'global.json'
# dotnet-version: |
# 6.x
# 8.x
# - name: Docker add main tag
# uses: ./.github/actions/docker-add-main-tag
# with:
# assemblySemFileVer: ${{needs.setup.outputs.semVer}}
# imageTag: ${{env.imageTag}}
# azureContainerRegistryName: ${{env.azureContainerRegistryName}}
# connectedServiceName: ${{env.connectedServiceName}}

0 comments on commit 027772f

Please sign in to comment.