Skip to content

Commit

Permalink
Fix sample contract packaging
Browse files Browse the repository at this point in the history
Sample contracts should be packaged for the k8s builder, but not the k8s builder image itself

Signed-off-by: James Taylor <jamest@uk.ibm.com>
  • Loading branch information
jt-nti committed Aug 4, 2022
1 parent 8a5cb14 commit a1081e5
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 1 deletion.
8 changes: 7 additions & 1 deletion .github/workflows/docker-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,11 @@ on:
description: 'A path containing a Dockerfile passed from the caller workflow'
required: true
type: string
chaincode:
description: 'A boolean indicating whether to create a chaincode package passed from the caller workflow'
required: false
default: false
type: boolean

jobs:
build:
Expand All @@ -32,6 +37,7 @@ jobs:
DOCKER_BUILD_PATH: ${{ inputs.path }}
IMAGE_NAME: ${{ inputs.imagename }}
- name: Publish Docker image
id: publish_image
if: github.event_name != 'pull_request'
run: |
echo ${DOCKER_PW} | docker login ghcr.io -u ${DOCKER_USER} --password-stdin
Expand All @@ -47,7 +53,7 @@ jobs:
DOCKER_PW: ${{ secrets.GITHUB_TOKEN }}

package:
if: needs.build.outputs.image_digest != ''
if: inputs.chaincode && needs.build.outputs.image_digest != ''
needs: build
runs-on: ubuntu-latest

Expand Down
1 change: 1 addition & 0 deletions .github/workflows/go-contract-image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,3 +21,4 @@ jobs:
with:
imagename: go-contract
path: samples/go-contract
chaincode: true
1 change: 1 addition & 0 deletions .github/workflows/java-contract-image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,3 +21,4 @@ jobs:
with:
imagename: java-contract
path: samples/java-contract
chaincode: true
1 change: 1 addition & 0 deletions .github/workflows/node-contract-image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,3 +21,4 @@ jobs:
with:
imagename: node-contract
path: samples/node-contract
chaincode: true

0 comments on commit a1081e5

Please sign in to comment.