Skip to content

Commit 2e8979f

Browse files
Adding docker publish from artefact
1 parent d1f264a commit 2e8979f

File tree

1 file changed

+26
-2
lines changed

1 file changed

+26
-2
lines changed

.github/workflows/stage-5-publish.yaml

Lines changed: 26 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -200,7 +200,7 @@ jobs:
200200
asset_content_type: "application/gzip"
201201

202202

203-
### PUBLISH DOCKER
203+
### PUBLISH DOCKER - THIS NEEDS CHANGING TO DO THE DOCKER BUILD IN THE BUILD STAGE AND ARTIFACT IT. SEE publishlibhostdocker below how how and the buildlibs action.
204204
publishdocker:
205205
name: "Publish docker packages"
206206
runs-on: ubuntu-latest
@@ -224,7 +224,6 @@ jobs:
224224
docker build . -t ghcr.io/nhsdigital/nhsnotifysupplierserver:latest
225225
echo $CR_PAT | docker login ghcr.io -u nhs-notify-supplier-api --password-stdin
226226
docker push ghcr.io/nhsdigital/nhsnotifysupplierserver:latest
227-
228227
env:
229228
CR_PAT: ${{ secrets.GITHUB_TOKEN }}
230229
@@ -582,3 +581,28 @@ jobs:
582581
env:
583582
TEST_NUGET_VERSION: ${{ steps.set-nuget-version.outputs.TEST_NUGET_VERSION }}
584583
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
584+
585+
586+
587+
### PUBLISH LIBS host docker
588+
publishlibhostdocker:
589+
name: "Publish libs host docker"
590+
runs-on: ubuntu-latest
591+
needs: [publish]
592+
permissions:
593+
packages: write
594+
contents: read
595+
steps:
596+
- name: "Get the artefacts"
597+
uses: actions/download-artifact@v4
598+
with:
599+
path: .
600+
name: libs-host-docker-${{ inputs.version }}
601+
602+
- run: |
603+
docker load --input ${{ runner.temp }}/myimage.tar
604+
docker image ls -a
605+
echo $CR_PAT | docker login ghcr.io -u nhs-notify-supplier-api --password-stdin
606+
docker push ghcr.io/nhsdigital/libshostdocker:latest
607+
env:
608+
CR_PAT: ${{ secrets.GITHUB_TOKEN }}

0 commit comments

Comments
 (0)