diff --git a/.github/actions/build_micro_service_ko/action.yml b/.github/actions/build_micro_service_ko/action.yml index 4cbfe171e..e0c20a72b 100644 --- a/.github/actions/build_micro_service_ko/action.yml +++ b/.github/actions/build_micro_service_ko/action.yml @@ -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 }} diff --git a/.github/workflows/build-gcp-guest-agent-ko.yml b/.github/workflows/build-gcp-guest-agent-ko.yml index 0d80927b1..50b88c2bc 100644 --- a/.github/workflows/build-gcp-guest-agent-ko.yml +++ b/.github/workflows/build-gcp-guest-agent-ko.yml @@ -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 }}