11name : publish 
22on :
3+   workflow_dispatch :
34  workflow_call :
45    inputs :
56      image_tag :
67        default : " devel" 
78        required : false 
89        type : string 
10+       registry :
11+         default : " docker.io/intel" 
12+         required : false 
13+         type : string 
914env :
1015  no_base_check : " ['intel-qat-plugin-kerneldrv', 'intel-idxd-config-initcontainer', 'crypto-perf', 'opae-nlb-demo']" 
1116
1217permissions :
1318  contents : read 
19+   id-token : write 
1420
1521jobs :
1622  image :
@@ -20,27 +26,27 @@ jobs:
2026      fail-fast : false 
2127      matrix :
2228        image :
23-           - intel-fpga-admissionwebhook 
24-           - intel-fpga-initcontainer 
25-           - intel-gpu-initcontainer 
29+           # - intel-fpga-admissionwebhook
30+           #   - intel-fpga-initcontainer
31+           #   - intel-gpu-initcontainer
2632          - intel-gpu-plugin 
27-           - intel-fpga-plugin 
28-           - intel-qat-initcontainer 
29-           - intel-qat-plugin 
30-           - intel-deviceplugin-operator 
31-           - intel-sgx-admissionwebhook 
32-           - intel-sgx-plugin 
33-           - intel-sgx-initcontainer 
34-           - intel-dsa-plugin 
35-           - intel-iaa-plugin 
36-           - intel-idxd-config-initcontainer 
37-           - intel-dlb-plugin 
38-           - intel-dlb-initcontainer 
39-           - intel-xpumanager-sidecar 
33+           #   - intel-fpga-plugin
34+           #   - intel-qat-initcontainer
35+           #   - intel-qat-plugin
36+           #   - intel-deviceplugin-operator
37+           #   - intel-sgx-admissionwebhook
38+           #   - intel-sgx-plugin
39+           #   - intel-sgx-initcontainer
40+           #   - intel-dsa-plugin
41+           #   - intel-iaa-plugin
42+           #   - intel-idxd-config-initcontainer
43+           #   - intel-dlb-plugin
44+           #   - intel-dlb-initcontainer
45+           #   - intel-xpumanager-sidecar
4046
4147          #  # Demo images
42-           - crypto-perf 
43-           - opae-nlb-demo 
48+           # - crypto-perf
49+           # - opae-nlb-demo
4450    steps :
4551      - uses : actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332  #  v4
4652      - uses : actions/setup-go@0a12ed9d6a96ab950c8f026ed9f722fe0da7ef32  #  v5
@@ -52,21 +58,44 @@ jobs:
5258        env :
5359          IMAGE_NAME : ${{ matrix.image }} 
5460        run : | 
55-           REG=intel/ make ${IMAGE_NAME} BUILDER=docker 
61+           ORG=${{ inputs.registry }} TAG=${{ inputs.image_tag }} make ${IMAGE_NAME} BUILDER=docker 
62+ name : List images 
63+         run : docker images 
5664      - name : Trivy scan for image 
5765        uses : aquasecurity/trivy-action@6e7b7d1fd3e4fef0c5fa8cce1229c54b2c9bd0d8  #  0.24.0
5866        with :
5967          scan-type : image 
60-           image-ref : intel /${{ matrix.image }}:${{ inputs.image_tag }}
68+           image-ref : ${{ inputs.registry }} /${{ matrix.image }}:${{ inputs.image_tag }}
6169          exit-code : 1 
6270      - name : Test image base layer 
6371        #  Don't run base layer check for selected images
6472        if : ${{ !contains(fromJson(env.no_base_check), matrix.image) }} 
65-         run : IMG=intel /${{ matrix.image }}:${{ inputs.image_tag }} make test-image-base-layer BUILDER=docker 
73+         run : IMG=${{ inputs.registry }} /${{ matrix.image }}:${{ inputs.image_tag }} make test-image-base-layer BUILDER=docker 
6674      - name : Login 
6775        uses : docker/login-action@9780b0c442fbb1117ed29e0efdff1e18412f7567  #  v3
6876        with :
77+           registry : ghcr.io 
6978          username : ${{ secrets.DOCKERHUB_USER }} 
7079          password : ${{ secrets.DOCKERHUB_PASS }} 
71-       - name : Push 
72-         run : docker push intel/${{ matrix.image }}:${{ inputs.image_tag }} 
80+       - name : Push & Pull 
81+         run : | 
82+           docker push ${{ inputs.registry }}/${{ matrix.image }}:${{ inputs.image_tag }} 
83+           docker pull ${{ inputs.registry }}/${{ matrix.image }}:${{ inputs.image_tag }} 
84+ name : Get image digest 
85+         if : ${{ inputs.image_tag != 'devel' }} 
86+         id : digest 
87+         run : | 
88+           echo "image_sha=$(docker inspect --format='{{index .RepoDigests 0}}' ${{ inputs.registry }}/${{ matrix.image }}:${{ inputs.image_tag }})" >> $GITHUB_OUTPUT 
89+ name : Install OIDC Client from Core Package 
90+         run : 
npm install @actions/[email protected]  @actions/http-client  91+       - name : Install cosign 
92+         if : ${{ inputs.image_tag != 'devel' }} 
93+ 94+       - name : Keyless image sign 
95+         if : ${{ inputs.image_tag != 'devel' }} 
96+         run : | 
97+           cosign sign --yes ${{ steps.digest.outputs.image_sha }} 
98+ # cosign sign --yes ${{ steps.digest.outputs.image_sha }}
99+       # - name: Verify the image signing
100+       #   run: |
101+       #     cosign verify  --rekor-url "https://rekor.sigstore.dev/" ${{ steps.digest.outputs.image_sha }} --certificate-identity "https://github.com/saintmalik/sign-container-images/.github/workflows/keyless.yaml@refs/heads/main" --certificate-oidc-issuer "https://token.actions.githubusercontent.com" | jq .
0 commit comments