update actions to use path to constellation

This commit is contained in:
leongross 2022-12-08 09:53:56 +01:00
parent d001df596a
commit d9b11a9948
No known key found for this signature in database
GPG Key ID: 8684D89F6BF9B743
2 changed files with 9 additions and 4 deletions

View File

@ -4,6 +4,10 @@ inputs:
name:
description: "Name of the micro-service"
required: true
constellationPath:
description: "Path to the Constellation repository"
default: "."
required: false
koConfig:
description: "Path to the .ko.yaml config file"
default: ".ko.yaml"
@ -37,11 +41,11 @@ runs:
steps:
- name: Determine pseudo version
id: pseudo-version
uses: ./.github/actions/pseudo_version
uses: ${{ inputs.constellationPath }}/.github/actions/pseudo_version
- name: Build and upload container image
id: build-and-upload
uses: ./.github/actions/build_ko
uses: ${{ inputs.constellationPath }}/.github/actions/build_ko
with:
name: ${{ inputs.name }}
koConfig: ${{ inputs.koConfig }}
@ -61,7 +65,7 @@ runs:
echo CONTAINER_FULL=$container_full >> $GITHUB_ENV
- name: Generate SBOM
uses: ./.github/actions/container_sbom
uses: ${{ inputs.constellationPath }}/.github/actions/container_sbom
with:
containerReference: ${{ env.CONTAINER_FULL }}
cosignPublicKey: ${{ inputs.cosignPublicKey }}

View File

@ -52,9 +52,10 @@ jobs:
- name: Build and upload join service container image
id: build-and-upload
# assumes that we are currently in the root of the repo
uses: ./constellation/.github/actions/build_micro_service_ko
uses: ${{ github.workspace }}/constellation/.github/actions/build-and-upload-ko
with:
name: gcp-guest-agent
constellationPath: ${{ github.workspace }}/constellation
koTarget: ./guest-agent/google-guest-agent/
githubToken: ${{ secrets.GITHUB_TOKEN }}
cosignPublicKey: ${{ startsWith(github.ref, 'refs/heads/release/v') && secrets.COSIGN_PUBLIC_KEY || secrets.COSIGN_DEV_PUBLIC_KEY }}