Skip to content

Commit

Permalink
release.yaml: Split artifact upload and don't delete release
Browse files Browse the repository at this point in the history
Artifact upload is buffered in memory, which is a limitation of the action. We
need to chunk the upload manually to work around this - by splitting it into
groups that fit within the memory limit of the worker.

We also don't need to delete the release - something that has caused us trouble
when the action fails during upload - and instead update the payload of
existing releases.  We can either keep pushing the "latest" tag (like now) or
push date base release tags and rename to "latest" manually.
  • Loading branch information
jepio committed Oct 1, 2024
1 parent 4902b3f commit c06b285
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 11 deletions.
39 changes: 29 additions & 10 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ on:
push:
tags:
- 'latest'
- '[0-9]+'
jobs:
build:
runs-on: ubuntu-22.04
Expand Down Expand Up @@ -38,18 +39,36 @@ jobs:
pushd bakery
REPO=${{ github.repository }} ./release_build.sh
- name: delete previous latest release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
pushd bakery
gh release delete latest --cleanup-tag
- name: create a new latest release with all artifacts
uses: softprops/action-gh-release@v1
- name: create a new latest release with some artifacts
uses: softprops/action-gh-release@v2
with:
make_latest: true
body_path: bakery/Release.md
files: |
bakery/SHA256SUMS
bakery/*.raw
bakery/!(kubernetes|crio|ollama)*.raw
bakery/*.conf
- name: upload kubernetes x86-64 artifacts
uses: softprops/action-gh-release@v2
with:
files: |
bakery/kubernetes*-x86-64.raw
- name: upload kubernetes arm64 artifacts
uses: softprops/action-gh-release@v2
with:
files: |
bakery/kubernetes*-arm64.raw
- name: upload crio artifacts
uses: softprops/action-gh-release@v2
with:
files: |
bakery/crio*.raw
- name: upload ollama artifacts
uses: softprops/action-gh-release@v2
with:
files: |
bakery/ollama*.raw
2 changes: 1 addition & 1 deletion bake_flatcar_image.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ install_to="root:/opt/extensions/"

set -euo pipefail
workdir="$(pwd)/flatcar-os-image"
bakery_base_url="https://github.com/flatcar/sysext-bakery/releases/download/latest"
bakery_base_url="https://github.com/flatcar/sysext-bakery/releases/latest/download"

# ./run_sdk_container ./image_to_vm.sh --help 2>&1 | grep '\--format'
supported_vendors=( "ami" "ami_vmdk" "azure" "cloudsigma" "cloudstack" "cloudstack_vhd" "digitalocean" "exoscale" "gce" "hyperv" "iso" "openstack" "openstack_mini" "packet" "parallels" "pxe" "qemu" "qemu_uefi" "qemu_uefi_secure" "rackspace" "rackspace_onmetal" "rackspace_vhd" "vagrant" "vagrant_parallels" "vagrant_virtualbox" "vagrant_vmware_fusion" "virtualbox" "vmware" "vmware_insecure" "vmware_ova" "vmware_raw" "xen" )
Expand Down

0 comments on commit c06b285

Please sign in to comment.