1- name : Publish node-installer image
1+ name : Build, Test, and Publish node-installer image
22
33on :
44 workflow_call :
1111jobs :
1212 # Note: assumes being called in a workflow where build has already run and
1313 # required artifacts have been uploaded
14- publish :
14+ build-test- publish :
1515 permissions :
1616 contents : read
1717 packages : write
@@ -38,22 +38,38 @@ jobs:
3838 - name : Setup buildx
3939 uses : docker/setup-buildx-action@v3
4040
41- - name : Login to GitHub container registry
42- uses : docker/login-action@v3
43- with :
44- registry : ghcr.io
45- username : ${{ github.actor }}
46- password : ${{ secrets.GITHUB_TOKEN }}
47-
48- # Build and push node-installer image
49- # TODO: remove once https://github.com/spinkube/runtime-class-manager handles this
41+ # Build and extract node-installer image
5042 - name : Extract musl artifacts into ./node-installer/.tmp/linux/(amd64|arm64) dir
5143 run : |
5244 mkdir -p ./node-installer/.tmp/linux/amd64
5345 mkdir -p ./node-installer/.tmp/linux/arm64
5446 for f in ./_artifacts/*/*-x86_64.tar.gz; do tar -xf $f --directory ./node-installer/.tmp/linux/amd64; done
5547 for f in ./_artifacts/*/*-aarch64.tar.gz; do tar -xf $f --directory ./node-installer/.tmp/linux/arm64; done
5648
49+ # Build local image for testing
50+ - name : Build node-installer image for testing
51+ run : make build-dev-installer-image
52+ working-directory : node-installer
53+
54+ # Install kind for integration testing
55+ - name : Install kind
56+ 57+ with :
58+ install_only : true
59+
60+ # Run the integration test
61+ - name : Run integration test
62+ run : ./integration-test.sh
63+ working-directory : node-installer
64+
65+ # Login to registry and publish if tests pass
66+ - name : Login to GitHub container registry
67+ uses : docker/login-action@v3
68+ with :
69+ registry : ghcr.io
70+ username : ${{ github.actor }}
71+ password : ${{ secrets.GITHUB_TOKEN }}
72+
5773 - name : Build and push node-installer image
5874 uses : docker/build-push-action@v5
5975 with :
0 commit comments