Skip to content

Commit

Permalink
TODO: GHA...
Browse files Browse the repository at this point in the history
  • Loading branch information
szatanjl committed Oct 8, 2024
1 parent b37d173 commit 23fd0ae
Showing 1 changed file with 32 additions and 31 deletions.
63 changes: 32 additions & 31 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ on:
tags:
- v*
- pre-rel-*
worflow_dispatch:

env:
self-test-img_tag: v0.1.4
Expand Down Expand Up @@ -57,14 +58,14 @@ jobs:
musl-gcc -v
git submodule init
git submodule update
cd runtime/init-container
cd rinit
make
- uses: actions/upload-artifact@v4
with:
name: init-container
path: |
runtime/init-container/initramfs.cpio.gz
runtime/init-container/vmlinuz-virt
rinit/initramfs.cpio.gz
rinit/vmlinuz-virt
build:
name: Build Release
Expand All @@ -81,10 +82,10 @@ jobs:
- uses: actions/download-artifact@v4
with:
name: init-container
path: runtime/init-container/
path: rinit
- run: |
ls -R
test -f runtime/init-container/initramfs.cpio.gz
test -f rinit/initramfs.cpio.gz
- name: Download self-test image
uses: robinraju/[email protected]
with:
Expand Down Expand Up @@ -139,23 +140,23 @@ jobs:
cp runtime/conf/ya-runtime-vm.json "$TARGET_DIR/"
cp -r runtime/poc/runtime "$TARGET_DIR/ya-runtime-vm/"
cp "runtime/image/self-test.gvmi" "$TARGET_DIR/ya-runtime-vm/runtime/"
cp "runtime/init-container/initramfs.cpio.gz" "$TARGET_DIR/ya-runtime-vm/runtime/"
cp "runtime/init-container/vmlinuz-virt" "$TARGET_DIR/ya-runtime-vm/runtime/"
cp "rinit/initramfs.cpio.gz" "$TARGET_DIR/ya-runtime-vm/runtime/"
cp "rinit/vmlinuz-virt" "$TARGET_DIR/ya-runtime-vm/runtime/"
(cd releases && tar czvf "ya-runtime-vm-${OS_NAME}-${TAG_NAME}.tar.gz" "ya-runtime-vm-${OS_NAME}-${TAG_NAME}")
echo "::set-output name=artifact::ya-runtime-vm-${OS_NAME}-${TAG_NAME}.tar.gz"
echo "::set-output name=media::application/tar+gzip"
- name: Upload
run: echo todo upload ${{ steps.pack.outputs.artifact }}
- name: Upload Release Asset
id: upload-release-asset
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.release_upload_url.outputs.result }}
asset_path: ./releases/${{ steps.pack.outputs.artifact }}
asset_name: ${{ steps.pack.outputs.artifact }}
asset_content_type: ${{ steps.pack.outputs.media }}
#- name: Upload
# run: echo todo upload ${{ steps.pack.outputs.artifact }}
#- name: Upload Release Asset
# id: upload-release-asset
# uses: actions/upload-release-asset@v1
# env:
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# with:
# upload_url: ${{ steps.release_upload_url.outputs.result }}
# asset_path: ./releases/${{ steps.pack.outputs.artifact }}
# asset_name: ${{ steps.pack.outputs.artifact }}
# asset_content_type: ${{ steps.pack.outputs.media }}
build-deb:
name: Build Deb
needs:
Expand Down Expand Up @@ -185,9 +186,9 @@ jobs:
- uses: actions/download-artifact@v4
with:
name: init-container
path: runtime/init-container/
path: rinit
- run: |
test -f runtime/init-container/initramfs.cpio.gz
test -f rinit/initramfs.cpio.gz
- name: Download self-test image
uses: robinraju/[email protected]
with:
Expand All @@ -214,13 +215,13 @@ jobs:
debVersion: ${{ steps.version.outputs.version }}
pkgName: ya-runtime-vm
subdir: runtime
- name: Upload Release Deb
id: upload-release-asset-core
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.release_upload_url.outputs.result }}
asset_path: ${{ steps.deb.outputs.deb }}
asset_name: ya-runtime-vm_${{ steps.version.outputs.tagv }}_amd64.deb
asset_content_type: application/vnd.debian.binary-package
#- name: Upload Release Deb
# id: upload-release-asset-core
# uses: actions/upload-release-asset@v1
# env:
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# with:
# upload_url: ${{ steps.release_upload_url.outputs.result }}
# asset_path: ${{ steps.deb.outputs.deb }}
# asset_name: ya-runtime-vm_${{ steps.version.outputs.tagv }}_amd64.deb
# asset_content_type: application/vnd.debian.binary-package

0 comments on commit 23fd0ae

Please sign in to comment.