diff --git a/.github/actions/build_micro_service_ko/action.yml b/.github/actions/build_micro_service_ko/action.yml index 9ebbe0291..843f4f040 100644 --- a/.github/actions/build_micro_service_ko/action.yml +++ b/.github/actions/build_micro_service_ko/action.yml @@ -42,9 +42,9 @@ runs: id: build-and-upload uses: ./.github/actions/build_ko with: - name: joinservice - koConfig: .ko.yaml - koTarget: ./joinservice/cmd + name: ${{ inputs.name }} + koConfig: ${{ inputs.koConfig }} + koTarget: ${{ inputs.koTarget }} githubToken: ${{ inputs.GITHUB_TOKEN }} pushTag: ci-test diff --git a/.github/actions/build_operator_ko/action.yml b/.github/actions/build_operator_ko/action.yml deleted file mode 100644 index 353fcc6c6..000000000 --- a/.github/actions/build_operator_ko/action.yml +++ /dev/null @@ -1,50 +0,0 @@ -name: Build operator -description: Build and upload a container image for a Constellation operator -inputs: - name: - description: "Name of the operator" - required: true - sourceDir: - description: "Path to the operators source directory" - required: true - pushTag: - description: "Use this image tag" - required: false - githubToken: - description: "GitHub authorization token" - required: true - cosignPublicKey: - description: "Cosign public key" - required: false - cosignPrivateKey: - description: "Cosign private key" - required: false - cosignPassword: - description: "Password for Cosign private key" - required: false - -# Linux runner only -runs: - using: "composite" - steps: - - name: Determine pseudo version - id: pseudo-version - uses: ./.github/actions/pseudo_version - - - name: Install operator-sdk - uses: ./.github/actions/install_operator_sdk - with: - version: v1.22.2 - - - name: Build and upload operator image - id: build-and-upload - uses: ./.github/actions/build_micro_service_ko - with: - name: node-operator - koTarget: ./operators/constellation-node-operator - githubToken: ${{ inputs.GITHUB_TOKEN }} - cosignPublicKey: ${{ inputs.CosignPublicKey }} - cosignPrivateKey: ${{ inputs.CosignPrivateKey }} - cosignPassword: ${{ inputs.CosignPassword }} - -# ignoring bundle since we do not use it anymore diff --git a/.github/workflows/build-constellation-node-operator-ko.yml b/.github/workflows/build-constellation-node-operator-ko.yml index 06b283a0a..ed5022761 100644 --- a/.github/workflows/build-constellation-node-operator-ko.yml +++ b/.github/workflows/build-constellation-node-operator-ko.yml @@ -19,16 +19,16 @@ jobs: with: ref: ${{ github.head_ref }} - - name: Setup Go environment - uses: actions/setup-go@c4a742cab115ed795e34d4513e2cf7d472deb55f # tag=v3.3.1 + - name: Install operator-sdk + uses: ./.github/actions/install_operator_sdk with: - go-version: "1.19.3" + version: v1.22.2 - name: Build and upload constellation-node-operator container image - uses: ./.github/actions/build_operator_ko + uses: ./.github/actions/build_micro_service_ko with: name: node-operator - sourceDir: operators/constellation-node-operator + koTarget: ./operators/constellation-node-operator githubToken: ${{ secrets.GITHUB_TOKEN }} cosignPublicKey: ${{ startsWith(github.ref, 'refs/heads/release/v') && secrets.COSIGN_PUBLIC_KEY || secrets.COSIGN_DEV_PUBLIC_KEY }} cosignPrivateKey: ${{ startsWith(github.ref, 'refs/heads/release/v') && secrets.COSIGN_PRIVATE_KEY || secrets.COSIGN_DEV_PRIVATE_KEY }} diff --git a/.github/workflows/build-joinservice-image-ko.yml b/.github/workflows/build-joinservice-image-ko.yml index 2a8441c96..409993fbf 100644 --- a/.github/workflows/build-joinservice-image-ko.yml +++ b/.github/workflows/build-joinservice-image-ko.yml @@ -22,11 +22,6 @@ jobs: with: ref: ${{ github.head_ref }} - - name: Setup Go environment - uses: actions/setup-go@c4a742cab115ed795e34d4513e2cf7d472deb55f # tag=v3.3.1 - with: - go-version: "1.19.3" - - name: Build and upload join service container image id: build-and-upload uses: ./.github/actions/build_micro_service_ko