@@ -441,64 +441,64 @@ runs:
441441 # don't fail if this doesn't exist, we may not always generate it
442442 sudo mv sbom-data-*.json $(basename ${image_file}).sbom-data.json || true
443443
444- # - id: 'google-auth-dev-images'
445- # if: env.IMAGE_TYPE == 'gcp'
446- # uses: 'google-github-actions/auth@v2'
447- # with:
448- # workload_identity_provider: 'projects/443728870479/locations/global/workloadIdentityPools/github-actions/providers/github'
449- # service_account: 'github-actions-cloud-images@almalinux-dev-images-469421.iam.gserviceaccount.com'
450- #
451- # - name: 'Set up Google Cloud SDK'
452- # if: env.IMAGE_TYPE == 'gcp'
453- # uses: 'google-github-actions/[email protected] ' 454-
455- # - name: 'Upload output to GCP storage bucket'
456- # if: env.IMAGE_TYPE == 'gcp'
457- # shell: bash
458- # run: gcloud storage cp ${{ env.IMAGE_FILE }} gs://almalinux-images-dev/almalinux-${version_major}${{ inputs.arch == 'aarch64' && '-arm64' || '' }}-v$(date +'%Y%m%d')/root.tar.gz
459-
460- # - name: Clone gce_image_publish repo
461- # if: env.IMAGE_TYPE == 'gcp'
462- # uses: actions/checkout@v5
463- # with:
464- # path: compute-image-tools
465- # repository: GoogleCloudPlatform/compute-image-tools
466- # ref: "20250916.00"
467-
468- # - name: Build gce_image_publish tool
469- # if: env.IMAGE_TYPE == 'gcp'
470- # shell: bash
471- # run: |
472- # # we need golang
473- # case ${{ env.runner_os }} in
474- # ubuntu)
475- # sudo apt update
476- # sudo apt-get -y install golang-go
477- # ;;
478- # rhel)
479- # sudo dnf -y -q install golang
480- # ;;
481- # esac
482- # # print golang version for reference
483- # go version
484- # # Build gce_image_publish tool
485- # cd compute-image-tools/cli_tools/gce_image_publish
486- # go mod tidy
487- # go install
488-
489- # - name: Create test image on GCP
490- # if: env.IMAGE_TYPE == 'gcp'
491- # shell: bash
492- # run: |
493- # /home/$USER/go/bin/gce_image_publish \
494- # -var:environment=test \
495- # -skip_confirmation \
496- # -rollout_rate=0 \
497- # -publish_project="almalinux-dev-images-469421" \
498- # -work_project="almalinux-dev-images-469421" \
499- # -replace \
500- # -source_gcs_path="gs://almalinux-images-dev/" \
501- # vm-scripts/gcp/almalinux_${version_major}${{ inputs.arch == 'aarch64' && '_arm64' || '' }}.publish.json
444+ - id : ' google-auth-dev-images'
445+ if : env.IMAGE_TYPE == 'gcp'
446+ uses : ' google-github-actions/auth@v2'
447+ with :
448+ workload_identity_provider : ' projects/443728870479/locations/global/workloadIdentityPools/github-actions/providers/github'
449+ service_account : ' github-actions-cloud-images@almalinux-dev-images-469421.iam.gserviceaccount.com'
450+
451+ - name : ' Set up Google Cloud SDK'
452+ if : env.IMAGE_TYPE == 'gcp'
453+ uses :
' google-github-actions/[email protected] ' 454+
455+ - name : ' Upload output to GCP storage bucket'
456+ if : env.IMAGE_TYPE == 'gcp'
457+ shell : bash
458+ run : gcloud storage cp ${{ env.IMAGE_FILE }} gs://almalinux-images-dev/almalinux-${version_major}${{ inputs.arch == 'aarch64' && '-arm64' || '' }}-v$(date +'%Y%m%d')/root.tar.gz
459+
460+ - name : Clone gce_image_publish repo
461+ if : env.IMAGE_TYPE == 'gcp'
462+ uses : actions/checkout@v5
463+ with :
464+ path : compute-image-tools
465+ repository : GoogleCloudPlatform/compute-image-tools
466+ ref : " 20250916.00"
467+
468+ - name : Build gce_image_publish tool
469+ if : env.IMAGE_TYPE == 'gcp'
470+ shell : bash
471+ run : |
472+ # we need golang
473+ case ${{ env.runner_os }} in
474+ ubuntu)
475+ sudo apt update
476+ sudo apt-get -y install golang-go
477+ ;;
478+ rhel)
479+ sudo dnf -y -q install golang
480+ ;;
481+ esac
482+ # print golang version for reference
483+ go version
484+ # Build gce_image_publish tool
485+ cd compute-image-tools/cli_tools/gce_image_publish
486+ go mod tidy
487+ go install
488+
489+ - name : Create test image on GCP
490+ if : env.IMAGE_TYPE == 'gcp'
491+ shell : bash
492+ run : |
493+ /home/$USER/go/bin/gce_image_publish \
494+ -var:environment=test \
495+ -skip_confirmation \
496+ -rollout_rate=0 \
497+ -publish_project="almalinux-dev-images-469421" \
498+ -work_project="almalinux-dev-images-469421" \
499+ -replace \
500+ -source_gcs_path="gs://almalinux-images-dev/" \
501+ vm-scripts/gcp/almalinux_${version_major}${{ inputs.arch == 'aarch64' && '_arm64' || '' }}.publish.json
502502
503503 # - name: 'Run Google cloud-image-testing tests (basic suite)'
504504 # if: env.IMAGE_TYPE == 'gcp' && inputs.run_test == 'true'
@@ -512,16 +512,12 @@ runs:
512512 # -images 'projects/almalinux-dev-images-469421/global/images/family/almalinux-${{ env.version_major }}${{ inputs.arch == 'aarch64' && '-arm64' || '' }}' \
513513 # -parallel_stagger 10s -parallel_count 20
514514
515- # TODO
516515 - name : Generate SBOM
517516 shell : bash
518517 run : |
519518 echo "Generating SBOM document of ${{ env.IMAGE_FILE }}"
520519 sudo .venv-sbom/bin/python3 sbom-tools/sbom_generator.py "${{ env.IMAGE_NAME }}" "${{ env.IMAGE_FILE }}.sbom-data.json" "${{ env.IMAGE_FILE }}.sbom.spdx.json"
521520
522- # - name: Setup tmate session
523- # uses: mxschmitt/action-tmate@v3
524-
525521 - name : Test ${{ inputs.type }} ${{ inputs.variant }} image
526522 # Skip testing for vagrant_virtualbox on GH runner because 'vugrant up' fails to connect to the newly created VM via ssh:
527523 # kex_exchange_identification: read: Connection reset by peer
0 commit comments