mirror of
https://github.com/kata-containers/kata-containers.git
synced 2025-04-30 04:34:27 +00:00
gha: Remove code duplication from release.yaml
We can easily re-use the newly added build-kata-static-tarball-*.yaml as part of the release.yaml file. By doing this we consolidate on how we build the components accross our actions. Signed-off-by: Fabiano Fidêncio <fabiano.fidencio@intel.com>
This commit is contained in:
parent
56331bd7bc
commit
d38d7fbf1a
59
.github/workflows/release.yaml
vendored
59
.github/workflows/release.yaml
vendored
@ -5,69 +5,18 @@ on:
|
|||||||
- '[0-9]+.[0-9]+.[0-9]+*'
|
- '[0-9]+.[0-9]+.[0-9]+*'
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build-asset:
|
build-kata-static-tarball-amd64:
|
||||||
runs-on: ubuntu-latest
|
uses: ./.github/workflows/build-kata-static-tarball-amd64.yaml
|
||||||
strategy:
|
|
||||||
matrix:
|
|
||||||
asset:
|
|
||||||
- cloud-hypervisor
|
|
||||||
- firecracker
|
|
||||||
- kernel
|
|
||||||
- kernel-dragonball-experimental
|
|
||||||
- nydus
|
|
||||||
- qemu
|
|
||||||
- rootfs-image
|
|
||||||
- rootfs-initrd
|
|
||||||
- shim-v2
|
|
||||||
- virtiofsd
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v2
|
|
||||||
- name: Build ${{ matrix.asset }}
|
|
||||||
run: |
|
|
||||||
./tools/packaging/kata-deploy/local-build/kata-deploy-copy-yq-installer.sh
|
|
||||||
./tools/packaging/kata-deploy/local-build/kata-deploy-binaries-in-docker.sh --build="${KATA_ASSET}"
|
|
||||||
build_dir=$(readlink -f build)
|
|
||||||
# store-artifact does not work with symlink
|
|
||||||
sudo cp -r "${build_dir}" "kata-build"
|
|
||||||
env:
|
|
||||||
KATA_ASSET: ${{ matrix.asset }}
|
|
||||||
TAR_OUTPUT: ${{ matrix.asset }}.tar.gz
|
|
||||||
|
|
||||||
- name: store-artifact ${{ matrix.asset }}
|
|
||||||
uses: actions/upload-artifact@v2
|
|
||||||
with:
|
|
||||||
name: kata-artifacts
|
|
||||||
path: kata-build/kata-static-${{ matrix.asset }}.tar.xz
|
|
||||||
if-no-files-found: error
|
|
||||||
|
|
||||||
create-kata-tarball:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
needs: build-asset
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v2
|
|
||||||
- name: get-artifacts
|
|
||||||
uses: actions/download-artifact@v2
|
|
||||||
with:
|
|
||||||
name: kata-artifacts
|
|
||||||
path: kata-artifacts
|
|
||||||
- name: merge-artifacts
|
|
||||||
run: |
|
|
||||||
./tools/packaging/kata-deploy/local-build/kata-deploy-merge-builds.sh kata-artifacts
|
|
||||||
- name: store-artifacts
|
|
||||||
uses: actions/upload-artifact@v2
|
|
||||||
with:
|
|
||||||
name: kata-static-tarball
|
|
||||||
path: kata-static.tar.xz
|
|
||||||
|
|
||||||
kata-deploy:
|
kata-deploy:
|
||||||
needs: create-kata-tarball
|
needs: build-kata-static-tarball-amd64
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v2
|
||||||
- name: get-kata-tarball
|
- name: get-kata-tarball
|
||||||
uses: actions/download-artifact@v2
|
uses: actions/download-artifact@v2
|
||||||
with:
|
with:
|
||||||
name: kata-static-tarball
|
name: kata-static-tarball-amd64
|
||||||
- name: build-and-push-kata-deploy-ci
|
- name: build-and-push-kata-deploy-ci
|
||||||
id: build-and-push-kata-deploy-ci
|
id: build-and-push-kata-deploy-ci
|
||||||
run: |
|
run: |
|
||||||
|
Loading…
Reference in New Issue
Block a user