mirror of
https://github.com/kata-containers/kata-containers.git
synced 2025-08-25 19:21:53 +00:00
release: Add _upload_versions_yaml_file()
As the name says, this function will be used to upload the versions.yaml file during a given release process of the project. Signed-off-by: Fabiano Fidêncio <fabiano.fidencio@intel.com>
This commit is contained in:
parent
50011e89a0
commit
94b30fcb14
11
.github/workflows/release.yaml
vendored
11
.github/workflows/release.yaml
vendored
@ -123,15 +123,10 @@ jobs:
|
|||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
- name: upload versions.yaml
|
- name: upload versions.yaml
|
||||||
env:
|
|
||||||
GITHUB_TOKEN: ${{ secrets.GIT_UPLOAD_TOKEN }}
|
|
||||||
run: |
|
run: |
|
||||||
tag=$(echo $GITHUB_REF | cut -d/ -f3-)
|
./tools/packaging/release/release.sh upload-versions-yaml-file
|
||||||
pushd $GITHUB_WORKSPACE
|
env:
|
||||||
versions_file="kata-containers-$tag-versions.yaml"
|
GH_TOKEN: ${{ github.token }}
|
||||||
cp versions.yaml ${versions_file}
|
|
||||||
gh release upload "${tag}" "${versions_file}"
|
|
||||||
popd
|
|
||||||
|
|
||||||
upload-cargo-vendored-tarball:
|
upload-cargo-vendored-tarball:
|
||||||
needs: upload-multi-arch-static-tarball
|
needs: upload-multi-arch-static-tarball
|
||||||
|
@ -74,6 +74,15 @@ function _upload_kata_static_tarball()
|
|||||||
gh release upload "${RELEASE_VERSION}" "${new_tarball_name}"
|
gh release upload "${RELEASE_VERSION}" "${new_tarball_name}"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function _upload_versions_yaml_file()
|
||||||
|
{
|
||||||
|
[ -z "${RELEASE_VERSION}" ] && RELEASE_VERSION=$(cat "${repo_root_dir}/VERSION")
|
||||||
|
|
||||||
|
versions_file="kata-containers-${RELEASE_VERSION}-versions.yaml"
|
||||||
|
cp "${repo_root_dir}/versions.yaml" ${versions_file}
|
||||||
|
gh release upload "${RELEASE_VERSION}" "${versions_file}"
|
||||||
|
}
|
||||||
|
|
||||||
function main()
|
function main()
|
||||||
{
|
{
|
||||||
action="${1:-}"
|
action="${1:-}"
|
||||||
@ -81,6 +90,7 @@ function main()
|
|||||||
case "${action}" in
|
case "${action}" in
|
||||||
publish-multiarch-manifest) _publish_multiarch_manifest ;;
|
publish-multiarch-manifest) _publish_multiarch_manifest ;;
|
||||||
upload-kata-static-tarball) _upload_kata_static_tarball ;;
|
upload-kata-static-tarball) _upload_kata_static_tarball ;;
|
||||||
|
upload-versions-yaml-file) _upload_versions_yaml_file ;;
|
||||||
*) >&2 _die "Invalid argument" ;;
|
*) >&2 _die "Invalid argument" ;;
|
||||||
esac
|
esac
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user