ci: fix workdir of apko base image build

Signed-off-by: Paul Meyer <49727155+katexochen@users.noreply.github.com>
This commit is contained in:
Paul Meyer 2023-02-10 16:14:32 +01:00
parent f60f967bd8
commit 278031b066
3 changed files with 7 additions and 5 deletions

View File

@ -64,10 +64,11 @@ runs:
env: env:
DOCKER_BUILDKIT: "1" DOCKER_BUILDKIT: "1"
run: | run: |
docker build -o . -f hack/package-hasher/Containerfile.apk.downloader . docker build -o ./apko -f hack/package-hasher/Containerfile.apk.downloader ./apko
- name: Build apko images and sign them - name: Build apko images and sign them
shell: bash shell: bash
working-directory: apko
env: env:
COSIGN_EXPERIMENTAL: "true" COSIGN_EXPERIMENTAL: "true"
COSIGN_PUBLIC_KEY: ${{ inputs.cosignPublicKey }} COSIGN_PUBLIC_KEY: ${{ inputs.cosignPublicKey }}
@ -77,7 +78,7 @@ runs:
APKO_ARCH: ${{ inputs.apkoArch }} APKO_ARCH: ${{ inputs.apkoArch }}
CONTAINER_TAGS: ${{ inputs.containerTags }} CONTAINER_TAGS: ${{ inputs.containerTags }}
REGISTRY: ${{ inputs.registry }} REGISTRY: ${{ inputs.registry }}
run: .github/actions/build_apko/build_and_sign.sh run: ../.github/actions/build_apko/build_and_sign.sh
- name: Sign sboms - name: Sign sboms
if: | if: |
@ -85,6 +86,7 @@ runs:
inputs.cosignPrivateKey != '' && inputs.cosignPrivateKey != '' &&
inputs.cosignPassword != '' inputs.cosignPassword != ''
shell: bash shell: bash
working-directory: apko
env: env:
COSIGN_PUBLIC_KEY: ${{ inputs.cosignPublicKey }} COSIGN_PUBLIC_KEY: ${{ inputs.cosignPublicKey }}
COSIGN_PRIVATE_KEY: ${{ inputs.cosignPrivateKey }} COSIGN_PRIVATE_KEY: ${{ inputs.cosignPrivateKey }}
@ -106,4 +108,4 @@ runs:
uses: actions/upload-artifact@0b7f8abb1508181956e8e162db84b466c27e18ce # v3.1.2 uses: actions/upload-artifact@0b7f8abb1508181956e8e162db84b466c27e18ce # v3.1.2
with: with:
name: sboms name: sboms
path: sboms.zip path: apko/sboms.zip

View File

@ -63,6 +63,6 @@ if [[ -n ${APKO_CONFIG} ]]; then
fi fi
echo "Building all images in image" echo "Building all images in image"
for imageConfig in apko/*.yaml; do for imageConfig in ./*.yaml; do
buildImage "${imageConfig}" buildImage "${imageConfig}"
done done

View File

@ -6,7 +6,7 @@ on:
branches: branches:
- main - main
paths: paths:
- "/apko/**" - "apko/**"
- ".github/workflows/build-apko-image.yml" - ".github/workflows/build-apko-image.yml"
jobs: jobs: