From 92e645041792ed12d79028f73540a71594777712 Mon Sep 17 00:00:00 2001 From: Din Music Date: Thu, 14 Mar 2024 14:58:43 +0100 Subject: [PATCH 1/3] github/actions/image-upload: Upload images using scp Signed-off-by: Din Music --- .github/actions/image-upload/action.yml | 75 ++++++++++++++++--------- 1 file changed, 49 insertions(+), 26 deletions(-) diff --git a/.github/actions/image-upload/action.yml b/.github/actions/image-upload/action.yml index 5bdedce65..131b74517 100644 --- a/.github/actions/image-upload/action.yml +++ b/.github/actions/image-upload/action.yml @@ -2,39 +2,62 @@ name: Upload Image description: Composite action for uploading built images inputs: - name: - description: Final image name - required: true target: description: Directory where built image is located required: true - # types: - # description: Image types - # required: true + image_dir: + description: Image directory in format /// + required: true + ssh_private_key: + description: SSH private key for the image server + required: true runs: using: composite steps: - # actions/upload-artifact does not expand env vars. - - name: Expand target path + - name: Print artifacts shell: bash - run: echo "target=${{ inputs.target }}" >> $GITHUB_ENV + run: ls -lah "${{ inputs.target }}" - - name: Print artifacts + - name: Configure private key and known host + shell: bash + env: + SSH_HOST: images.lxd.canonical.com + run : | + # Store image server private key. + mkdir -p -m 0700 ~/.ssh + touch ~/.ssh/id_ed25519 + chmod 0600 ~/.ssh/id_ed25519 + echo "${{ inputs.ssh_private_key }}" > ~/.ssh/id_ed25519 + + # Configure known host. + echo "${SSH_HOST} ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIOJS6V7WpVdFdAcTSn/98rBRsvJVyTI3O17qMeg0cD5E" >> ~/.ssh/known_hosts + + - name: Upload artifacts to the image server shell: bash - run: ls -lah "${{ env.target }}" - - - name: Publish artifacts - uses: actions/upload-artifact@v4 - with: - name: "${{ inputs.name }}" - path: | - ${{ env.target }}/*.qcow2 - ${{ env.target }}/*.squashfs - ${{ env.target }}/*.tar.xz - ${{ env.target }}/image.yaml - ${{ env.target }}/serial - if-no-files-found: "error" - retention-days: 1 - compression-level: 0 - overwrite: true + env: + SSH_HOST: images.lxd.canonical.com + SSH_USER: imageserver + SSH_PORT: 922 + run: | + # Ensure path of the source directory is expanded. + SRC_DIR=$(echo ${{ inputs.target }}) + IMG_DIR=${{ inputs.image_dir }} + VERSION=$(cat "${SRC_DIR}/serial") + + # Create directory structure that will be mirrored on the target server. + PRODUCT_PATH="${SRC_DIR}-upload/${IMG_DIR}" + mkdir -p "${PRODUCT_PATH}/${VERSION}" + + # Move config.yaml file if exists. + if [ -f "${SRC_DIR}/config.yaml" ]; then + mv "${SRC_DIR}/config.yaml" "${PRODUCT_PATH}" + fi + + # Move image content. + mv ${SRC_DIR}/* "${PRODUCT_PATH}/${VERSION}" + + # s -> Uses SFTP protocol + # r -> Copies files recursively + # p -> Preserves modification and access times + scp -srp -P ${SSH_PORT} ${SRC_DIR}-upload/* "${SSH_USER}@${SSH_HOST}:." From c6be3aa5d90ed39938013d69cccacfc0bb79ebbd Mon Sep 17 00:00:00 2001 From: Din Music Date: Thu, 14 Mar 2024 13:48:28 +0100 Subject: [PATCH 2/3] bin/build-distro: Remove semicolon from serial Semicolon in version (serial) does not affect anything, it is just a cosmetic change. Signed-off-by: Din Music --- bin/build-distro | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bin/build-distro b/bin/build-distro index 6f80c55f3..7f76ecdd0 100755 --- a/bin/build-distro +++ b/bin/build-distro @@ -22,8 +22,8 @@ cd "${TARGET}" cp "${YAML}" image.yaml # Get lxd-imagebuilder path and create a serial. -BUILDER=$(which lxd-imagebuilder) -SERIAL=$(date -u +%Y%m%d_%H:%M) +BUILDER=$(command -v lxd-imagebuilder) +SERIAL=$(date -u +%Y%m%d_%H%M) # Build plain rootfs. sudo "${BUILDER}" build-dir image.yaml rootfs \ From 26d50affbf480a1d26b1269a849fb74920b8bb3b Mon Sep 17 00:00:00 2001 From: Din Music Date: Thu, 21 Mar 2024 12:32:14 +0100 Subject: [PATCH 3/3] github/workflows: Configure image uploading When image workflow is called from another workflow, enable image uploading by default. When image workflow is triggered manually, disable image upload by default. Signed-off-by: Din Music --- .github/workflows/image-almalinux.yml | 10 ++++++++-- .github/workflows/image-alpine.yml | 10 ++++++++-- .github/workflows/image-alt.yml | 10 ++++++++-- .github/workflows/image-amazonlinux.yml | 10 ++++++++-- .github/workflows/image-archlinux.yml | 10 ++++++++-- .github/workflows/image-busybox.yml | 10 ++++++++-- .github/workflows/image-centos.yml | 10 ++++++++-- .github/workflows/image-debian.yml | 10 ++++++++-- .github/workflows/image-devuan.yml | 11 ++++++++--- .github/workflows/image-fedora.yml | 10 ++++++++-- .github/workflows/image-funtoo.yml | 10 ++++++++-- .github/workflows/image-gentoo.yml | 10 ++++++++-- .github/workflows/image-kali.yml | 10 ++++++++-- .github/workflows/image-nixos.yml | 10 ++++++++-- .github/workflows/image-openeuler.yml | 10 ++++++++-- .github/workflows/image-opensuse.yml | 10 ++++++++-- .github/workflows/image-openwrt.yml | 10 ++++++++-- .github/workflows/image-oracle.yml | 7 ++++++- .github/workflows/image-rockylinux.yml | 10 ++++++++-- .github/workflows/image-ubuntu.yml | 10 ++++++++-- .github/workflows/image-voidlinux.yml | 10 ++++++++-- 21 files changed, 166 insertions(+), 42 deletions(-) diff --git a/.github/workflows/image-almalinux.yml b/.github/workflows/image-almalinux.yml index 5d4acb1d4..2bbcc42b5 100644 --- a/.github/workflows/image-almalinux.yml +++ b/.github/workflows/image-almalinux.yml @@ -2,12 +2,17 @@ name: Build AlmaLinux Images on: workflow_dispatch: - workflow_call: inputs: publish: type: boolean default: false description: Publish built image + workflow_call: + inputs: + publish: + type: boolean + default: true + description: Publish built image jobs: almalinux: @@ -88,5 +93,6 @@ jobs: uses: ./.github/actions/image-upload if: inputs.publish == true with: - name: "${{ env.distro }}-${{ matrix.release }}-${{ matrix.architecture }}-${{ matrix.variant }}" target: ${{ env.target }} + image_dir: "${{ env.distro }}/${{ matrix.release }}/${{ matrix.architecture }}/${{ matrix.variant }}" + ssh_private_key: "${{ secrets.LXD_INFRA_IMAGES_KEY }}" diff --git a/.github/workflows/image-alpine.yml b/.github/workflows/image-alpine.yml index 63c610ac7..de2103669 100644 --- a/.github/workflows/image-alpine.yml +++ b/.github/workflows/image-alpine.yml @@ -2,12 +2,17 @@ name: Build Alpine Images on: workflow_dispatch: - workflow_call: inputs: publish: type: boolean default: false description: Publish built image + workflow_call: + inputs: + publish: + type: boolean + default: true + description: Publish built image jobs: alpine: @@ -90,5 +95,6 @@ jobs: uses: ./.github/actions/image-upload if: inputs.publish == true with: - name: "${{ env.distro }}-${{ matrix.release }}-${{ matrix.architecture }}-${{ matrix.variant }}" target: ${{ env.target }} + image_dir: "${{ env.distro }}/${{ matrix.release }}/${{ matrix.architecture }}/${{ matrix.variant }}" + ssh_private_key: "${{ secrets.LXD_INFRA_IMAGES_KEY }}" diff --git a/.github/workflows/image-alt.yml b/.github/workflows/image-alt.yml index 2945918a3..467f758e4 100644 --- a/.github/workflows/image-alt.yml +++ b/.github/workflows/image-alt.yml @@ -2,12 +2,17 @@ name: Build ALT Linux Images on: workflow_dispatch: - workflow_call: inputs: publish: type: boolean default: false description: Publish built image + workflow_call: + inputs: + publish: + type: boolean + default: true + description: Publish built image jobs: alt: @@ -77,5 +82,6 @@ jobs: uses: ./.github/actions/image-upload if: inputs.publish == true with: - name: "${{ env.distro }}-${{ matrix.release }}-${{ matrix.architecture }}-${{ matrix.variant }}" target: ${{ env.target }} + image_dir: "${{ env.distro }}/${{ matrix.release }}/${{ matrix.architecture }}/${{ matrix.variant }}" + ssh_private_key: "${{ secrets.LXD_INFRA_IMAGES_KEY }}" diff --git a/.github/workflows/image-amazonlinux.yml b/.github/workflows/image-amazonlinux.yml index 848c54234..98d850ab7 100644 --- a/.github/workflows/image-amazonlinux.yml +++ b/.github/workflows/image-amazonlinux.yml @@ -2,12 +2,17 @@ name: Build AmazonLinux Images on: workflow_dispatch: - workflow_call: inputs: publish: type: boolean default: false description: Publish built image + workflow_call: + inputs: + publish: + type: boolean + default: true + description: Publish built image jobs: amazonlinux: @@ -103,5 +108,6 @@ jobs: uses: ./.github/actions/image-upload if: inputs.publish == true with: - name: "${{ env.distro }}-${{ matrix.release }}-${{ matrix.architecture }}-${{ matrix.variant }}" target: ${{ env.target }} + image_dir: "${{ env.distro }}/${{ matrix.release }}/${{ matrix.architecture }}/${{ matrix.variant }}" + ssh_private_key: "${{ secrets.LXD_INFRA_IMAGES_KEY }}" diff --git a/.github/workflows/image-archlinux.yml b/.github/workflows/image-archlinux.yml index 9581ebd7e..73e3a53df 100644 --- a/.github/workflows/image-archlinux.yml +++ b/.github/workflows/image-archlinux.yml @@ -2,12 +2,17 @@ name: Build ArchLinux Images on: workflow_dispatch: - workflow_call: inputs: publish: type: boolean default: false description: Publish built image + workflow_call: + inputs: + publish: + type: boolean + default: true + description: Publish built image jobs: archlinux: @@ -97,5 +102,6 @@ jobs: uses: ./.github/actions/image-upload if: inputs.publish == true with: - name: "${{ env.distro }}-${{ matrix.release }}-${{ matrix.architecture }}-${{ matrix.variant }}" target: ${{ env.target }} + image_dir: "${{ env.distro }}/${{ matrix.release }}/${{ matrix.architecture }}/${{ matrix.variant }}" + ssh_private_key: "${{ secrets.LXD_INFRA_IMAGES_KEY }}" diff --git a/.github/workflows/image-busybox.yml b/.github/workflows/image-busybox.yml index e59d15a7e..259ce8d2b 100644 --- a/.github/workflows/image-busybox.yml +++ b/.github/workflows/image-busybox.yml @@ -2,12 +2,17 @@ name: Build BusyBox Images on: workflow_dispatch: - workflow_call: inputs: publish: type: boolean default: false description: Publish built image + workflow_call: + inputs: + publish: + type: boolean + default: true + description: Publish built image jobs: busybox: @@ -73,5 +78,6 @@ jobs: uses: ./.github/actions/image-upload if: inputs.publish == true with: - name: "${{ env.distro }}-${{ matrix.release }}-${{ matrix.architecture }}-${{ matrix.variant }}" target: ${{ env.target }} + image_dir: "${{ env.distro }}/${{ matrix.release }}/${{ matrix.architecture }}/${{ matrix.variant }}" + ssh_private_key: "${{ secrets.LXD_INFRA_IMAGES_KEY }}" diff --git a/.github/workflows/image-centos.yml b/.github/workflows/image-centos.yml index 01e1d96ba..237019c84 100644 --- a/.github/workflows/image-centos.yml +++ b/.github/workflows/image-centos.yml @@ -2,12 +2,17 @@ name: Build CentOS Images on: workflow_dispatch: - workflow_call: inputs: publish: type: boolean default: false description: Publish built image + workflow_call: + inputs: + publish: + type: boolean + default: true + description: Publish built image jobs: centos: @@ -107,5 +112,6 @@ jobs: uses: ./.github/actions/image-upload if: inputs.publish == true with: - name: "${{ env.distro }}-${{ matrix.release }}-${{ matrix.architecture }}-${{ matrix.variant }}" target: ${{ env.target }} + image_dir: "${{ env.distro }}/${{ matrix.release }}/${{ matrix.architecture }}/${{ matrix.variant }}" + ssh_private_key: "${{ secrets.LXD_INFRA_IMAGES_KEY }}" diff --git a/.github/workflows/image-debian.yml b/.github/workflows/image-debian.yml index 30f2f5c04..fff10c16c 100644 --- a/.github/workflows/image-debian.yml +++ b/.github/workflows/image-debian.yml @@ -2,12 +2,17 @@ name: Build Debian Images on: workflow_dispatch: - workflow_call: inputs: publish: type: boolean default: false description: Publish built image + workflow_call: + inputs: + publish: + type: boolean + default: true + description: Publish built image jobs: debian: @@ -87,5 +92,6 @@ jobs: uses: ./.github/actions/image-upload if: inputs.publish == true with: - name: "${{ env.distro }}-${{ matrix.release }}-${{ matrix.architecture }}-${{ matrix.variant }}" target: ${{ env.target }} + image_dir: "${{ env.distro }}/${{ matrix.release }}/${{ matrix.architecture }}/${{ matrix.variant }}" + ssh_private_key: "${{ secrets.LXD_INFRA_IMAGES_KEY }}" diff --git a/.github/workflows/image-devuan.yml b/.github/workflows/image-devuan.yml index 7bfcfded8..27f648efa 100644 --- a/.github/workflows/image-devuan.yml +++ b/.github/workflows/image-devuan.yml @@ -2,12 +2,17 @@ name: Build Devuan Images on: workflow_dispatch: - workflow_call: inputs: publish: type: boolean default: false description: Publish built image + workflow_call: + inputs: + publish: + type: boolean + default: true + description: Publish built image jobs: devuan: @@ -77,6 +82,6 @@ jobs: uses: ./.github/actions/image-upload if: inputs.publish == true with: - name: "${{ env.distro }}-${{ matrix.release }}-${{ matrix.architecture }}-${{ matrix.variant }}" target: ${{ env.target }} - # types: ${{ env.type }} + image_dir: "${{ env.distro }}/${{ matrix.release }}/${{ matrix.architecture }}/${{ matrix.variant }}" + ssh_private_key: "${{ secrets.LXD_INFRA_IMAGES_KEY }}" diff --git a/.github/workflows/image-fedora.yml b/.github/workflows/image-fedora.yml index f4a8771ff..4c4eef14f 100644 --- a/.github/workflows/image-fedora.yml +++ b/.github/workflows/image-fedora.yml @@ -2,12 +2,17 @@ name: Build Fedora Images on: workflow_dispatch: - workflow_call: inputs: publish: type: boolean default: false description: Publish built image + workflow_call: + inputs: + publish: + type: boolean + default: true + description: Publish built image jobs: fedora: @@ -88,5 +93,6 @@ jobs: uses: ./.github/actions/image-upload if: inputs.publish == true with: - name: "${{ env.distro }}-${{ matrix.release }}-${{ matrix.architecture }}-${{ matrix.variant }}" target: ${{ env.target }} + image_dir: "${{ env.distro }}/${{ matrix.release }}/${{ matrix.architecture }}/${{ matrix.variant }}" + ssh_private_key: "${{ secrets.LXD_INFRA_IMAGES_KEY }}" diff --git a/.github/workflows/image-funtoo.yml b/.github/workflows/image-funtoo.yml index e0e7622f2..1e737e0f3 100644 --- a/.github/workflows/image-funtoo.yml +++ b/.github/workflows/image-funtoo.yml @@ -2,12 +2,17 @@ name: Build Funtoo Images on: workflow_dispatch: - workflow_call: inputs: publish: type: boolean default: false description: Publish built image + workflow_call: + inputs: + publish: + type: boolean + default: true + description: Publish built image jobs: funtoo: @@ -78,5 +83,6 @@ jobs: uses: ./.github/actions/image-upload if: inputs.publish == true with: - name: "${{ env.distro }}-${{ matrix.release }}-${{ matrix.architecture }}-${{ matrix.variant }}" target: ${{ env.target }} + image_dir: "${{ env.distro }}/${{ matrix.release }}/${{ matrix.architecture }}/${{ matrix.variant }}" + ssh_private_key: "${{ secrets.LXD_INFRA_IMAGES_KEY }}" diff --git a/.github/workflows/image-gentoo.yml b/.github/workflows/image-gentoo.yml index 3783a085c..f78e95928 100644 --- a/.github/workflows/image-gentoo.yml +++ b/.github/workflows/image-gentoo.yml @@ -2,12 +2,17 @@ name: Build Gentoo Images on: workflow_dispatch: - workflow_call: inputs: publish: type: boolean default: false description: Publish built image + workflow_call: + inputs: + publish: + type: boolean + default: true + description: Publish built image jobs: gentoo: @@ -82,5 +87,6 @@ jobs: uses: ./.github/actions/image-upload if: inputs.publish == true with: - name: "${{ env.distro }}-${{ matrix.release }}-${{ matrix.architecture }}-${{ matrix.variant }}" target: ${{ env.target }} + image_dir: "${{ env.distro }}/${{ matrix.release }}/${{ matrix.architecture }}/${{ matrix.variant }}" + ssh_private_key: "${{ secrets.LXD_INFRA_IMAGES_KEY }}" diff --git a/.github/workflows/image-kali.yml b/.github/workflows/image-kali.yml index 923dabeb4..b71288dd4 100644 --- a/.github/workflows/image-kali.yml +++ b/.github/workflows/image-kali.yml @@ -2,12 +2,17 @@ name: Build Kali Images on: workflow_dispatch: - workflow_call: inputs: publish: type: boolean default: false description: Publish built image + workflow_call: + inputs: + publish: + type: boolean + default: true + description: Publish built image jobs: kali: @@ -75,5 +80,6 @@ jobs: uses: ./.github/actions/image-upload if: inputs.publish == true with: - name: "${{ env.distro }}-${{ matrix.release }}-${{ matrix.architecture }}-${{ matrix.variant }}" target: ${{ env.target }} + image_dir: "${{ env.distro }}/${{ matrix.release }}/${{ matrix.architecture }}/${{ matrix.variant }}" + ssh_private_key: "${{ secrets.LXD_INFRA_IMAGES_KEY }}" diff --git a/.github/workflows/image-nixos.yml b/.github/workflows/image-nixos.yml index 329d837f3..d5bf70599 100644 --- a/.github/workflows/image-nixos.yml +++ b/.github/workflows/image-nixos.yml @@ -2,12 +2,17 @@ name: Build NixOS Images on: workflow_dispatch: - workflow_call: inputs: publish: type: boolean default: false description: Publish built image + workflow_call: + inputs: + publish: + type: boolean + default: true + description: Publish built image jobs: nixos: @@ -78,5 +83,6 @@ jobs: uses: ./.github/actions/image-upload if: inputs.publish == true with: - name: "${{ env.distro }}-${{ matrix.release }}-${{ matrix.architecture }}-${{ matrix.variant }}" target: ${{ env.target }} + image_dir: "${{ env.distro }}/${{ matrix.release }}/${{ matrix.architecture }}/${{ matrix.variant }}" + ssh_private_key: "${{ secrets.LXD_INFRA_IMAGES_KEY }}" diff --git a/.github/workflows/image-openeuler.yml b/.github/workflows/image-openeuler.yml index 797a2d75b..1109ed56e 100644 --- a/.github/workflows/image-openeuler.yml +++ b/.github/workflows/image-openeuler.yml @@ -2,12 +2,17 @@ name: Build openEuler Images on: workflow_dispatch: - workflow_call: inputs: publish: type: boolean default: false description: Publish built image + workflow_call: + inputs: + publish: + type: boolean + default: true + description: Publish built image jobs: openeuler: @@ -88,5 +93,6 @@ jobs: uses: ./.github/actions/image-upload if: inputs.publish == true with: - name: "${{ env.distro }}-${{ matrix.release }}-${{ matrix.architecture }}-${{ matrix.variant }}" target: ${{ env.target }} + image_dir: "${{ env.distro }}/${{ matrix.release }}/${{ matrix.architecture }}/${{ matrix.variant }}" + ssh_private_key: "${{ secrets.LXD_INFRA_IMAGES_KEY }}" diff --git a/.github/workflows/image-opensuse.yml b/.github/workflows/image-opensuse.yml index 4284b7163..dd62bdb85 100644 --- a/.github/workflows/image-opensuse.yml +++ b/.github/workflows/image-opensuse.yml @@ -2,12 +2,17 @@ name: Build OpenSUSE Images on: workflow_dispatch: - workflow_call: inputs: publish: type: boolean default: false description: Publish built image + workflow_call: + inputs: + publish: + type: boolean + default: true + description: Publish built image jobs: opensuse: @@ -95,5 +100,6 @@ jobs: uses: ./.github/actions/image-upload if: inputs.publish == true with: - name: "${{ env.distro }}-${{ matrix.release }}-${{ matrix.architecture }}-${{ matrix.variant }}" target: ${{ env.target }} + image_dir: "${{ env.distro }}/${{ matrix.release }}/${{ matrix.architecture }}/${{ matrix.variant }}" + ssh_private_key: "${{ secrets.LXD_INFRA_IMAGES_KEY }}" diff --git a/.github/workflows/image-openwrt.yml b/.github/workflows/image-openwrt.yml index 84ee3ff0d..783860e56 100644 --- a/.github/workflows/image-openwrt.yml +++ b/.github/workflows/image-openwrt.yml @@ -2,12 +2,17 @@ name: Build OpenWRT Images on: workflow_dispatch: - workflow_call: inputs: publish: type: boolean default: false description: Publish built image + workflow_call: + inputs: + publish: + type: boolean + default: true + description: Publish built image jobs: openwrt: @@ -79,5 +84,6 @@ jobs: uses: ./.github/actions/image-upload if: inputs.publish == true with: - name: "${{ env.distro }}-${{ matrix.release }}-${{ matrix.architecture }}-${{ matrix.variant }}" target: ${{ env.target }} + image_dir: "${{ env.distro }}/${{ matrix.release }}/${{ matrix.architecture }}/${{ matrix.variant }}" + ssh_private_key: "${{ secrets.LXD_INFRA_IMAGES_KEY }}" diff --git a/.github/workflows/image-oracle.yml b/.github/workflows/image-oracle.yml index c91dc9b49..34925ad01 100644 --- a/.github/workflows/image-oracle.yml +++ b/.github/workflows/image-oracle.yml @@ -2,12 +2,17 @@ name: Build Oracle Images on: workflow_dispatch: - workflow_call: inputs: publish: type: boolean default: false description: Publish built image + workflow_call: + inputs: + publish: + type: boolean + default: true + description: Publish built image jobs: oracle: diff --git a/.github/workflows/image-rockylinux.yml b/.github/workflows/image-rockylinux.yml index 4a951ed8c..8955baf0b 100644 --- a/.github/workflows/image-rockylinux.yml +++ b/.github/workflows/image-rockylinux.yml @@ -2,12 +2,17 @@ name: Build RockyLinux Images on: workflow_dispatch: - workflow_call: inputs: publish: type: boolean default: false description: Publish built image + workflow_call: + inputs: + publish: + type: boolean + default: true + description: Publish built image jobs: rockylinux: @@ -88,5 +93,6 @@ jobs: uses: ./.github/actions/image-upload if: inputs.publish == true with: - name: "${{ env.distro }}-${{ matrix.release }}-${{ matrix.architecture }}-${{ matrix.variant }}" target: ${{ env.target }} + image_dir: "${{ env.distro }}/${{ matrix.release }}/${{ matrix.architecture }}/${{ matrix.variant }}" + ssh_private_key: "${{ secrets.LXD_INFRA_IMAGES_KEY }}" diff --git a/.github/workflows/image-ubuntu.yml b/.github/workflows/image-ubuntu.yml index ac037158f..aed34665e 100644 --- a/.github/workflows/image-ubuntu.yml +++ b/.github/workflows/image-ubuntu.yml @@ -2,12 +2,17 @@ name: Build Ubuntu Images on: workflow_dispatch: - workflow_call: inputs: publish: type: boolean default: false description: Publish built image + workflow_call: + inputs: + publish: + type: boolean + default: true + description: Publish built image jobs: ubuntu: @@ -103,5 +108,6 @@ jobs: uses: ./.github/actions/image-upload if: inputs.publish == true with: - name: "${{ env.distro }}-${{ matrix.release }}-${{ matrix.architecture }}-${{ matrix.variant }}" target: ${{ env.target }} + image_dir: "${{ env.distro }}/${{ matrix.release }}/${{ matrix.architecture }}/${{ matrix.variant }}" + ssh_private_key: "${{ secrets.LXD_INFRA_IMAGES_KEY }}" diff --git a/.github/workflows/image-voidlinux.yml b/.github/workflows/image-voidlinux.yml index 7403eca10..ff3346cc6 100644 --- a/.github/workflows/image-voidlinux.yml +++ b/.github/workflows/image-voidlinux.yml @@ -2,12 +2,17 @@ name: Build VoidLinux Images on: workflow_dispatch: - workflow_call: inputs: publish: type: boolean default: false description: Publish built image + workflow_call: + inputs: + publish: + type: boolean + default: true + description: Publish built image jobs: voidlinux: @@ -85,5 +90,6 @@ jobs: uses: ./.github/actions/image-upload if: inputs.publish == true with: - name: "${{ env.distro }}-${{ matrix.release }}-${{ matrix.architecture }}-${{ matrix.variant }}" target: ${{ env.target }} + image_dir: "${{ env.distro }}/${{ matrix.release }}/${{ matrix.architecture }}/${{ matrix.variant }}" + ssh_private_key: "${{ secrets.LXD_INFRA_IMAGES_KEY }}"