mirror of
https://github.com/kata-containers/kata-containers.git
synced 2025-06-23 14:08:31 +00:00
release: Add _upload_libseccomp_tarball()
As the name of the function says, it's responsible for uploading the libseccomp source tarballs as par of our release process. Signed-off-by: Fabiano Fidêncio <fabiano.fidencio@intel.com>
This commit is contained in:
parent
d517fa54ac
commit
fd699625fe
20
.github/workflows/release.yaml
vendored
20
.github/workflows/release.yaml
vendored
@ -145,21 +145,7 @@ jobs:
|
|||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
- name: download-and-upload-tarball
|
- name: download-and-upload-tarball
|
||||||
env:
|
|
||||||
GITHUB_TOKEN: ${{ secrets.GIT_UPLOAD_TOKEN }}
|
|
||||||
GOPATH: ${HOME}/go
|
|
||||||
run: |
|
run: |
|
||||||
pushd $GITHUB_WORKSPACE
|
./tools/packaging/release/release.sh upload-libseccomp-tarball
|
||||||
./ci/install_yq.sh
|
env:
|
||||||
tag=$(echo $GITHUB_REF | cut -d/ -f3-)
|
GH_TOKEN: ${{ github.token }}
|
||||||
versions_yaml="versions.yaml"
|
|
||||||
version=$(${GOPATH}/bin/yq read ${versions_yaml} "externals.libseccomp.version")
|
|
||||||
repo_url=$(${GOPATH}/bin/yq read ${versions_yaml} "externals.libseccomp.url")
|
|
||||||
download_url="${repo_url}/releases/download/v${version}"
|
|
||||||
tarball="libseccomp-${version}.tar.gz"
|
|
||||||
asc="${tarball}.asc"
|
|
||||||
curl -sSLO "${download_url}/${tarball}"
|
|
||||||
curl -sSLO "${download_url}/${asc}"
|
|
||||||
gh release upload "${tag}" "${tarball}"
|
|
||||||
gh release upload "${tag}" "${asc}"
|
|
||||||
popd
|
|
||||||
|
@ -94,6 +94,26 @@ function _upload_vendored_code_tarball()
|
|||||||
gh release upload "${RELEASE_VERSION}" "${vendored_code_tarball}"
|
gh release upload "${RELEASE_VERSION}" "${vendored_code_tarball}"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function _upload_libseccomp_tarball()
|
||||||
|
{
|
||||||
|
_check_required_env_var "GH_TOKEN"
|
||||||
|
|
||||||
|
[ -z "${RELEASE_VERSION}" ] && RELEASE_VERSION=$(cat "${repo_root_dir}/VERSION")
|
||||||
|
|
||||||
|
INSTALL_IN_GO_PATH=false ${repo_root_dir}/ci/install_yq.sh
|
||||||
|
|
||||||
|
versions_yaml="versions.yaml"
|
||||||
|
version=$(/usr/local/bin/yq read ${versions_yaml} "externals.libseccomp.version")
|
||||||
|
repo_url=$(/usr/local/bin/yq read ${versions_yaml} "externals.libseccomp.url")
|
||||||
|
download_url="${repo_url}releases/download/v${version}"
|
||||||
|
tarball="libseccomp-${version}.tar.gz"
|
||||||
|
asc="${tarball}.asc"
|
||||||
|
curl -sSLO "${download_url}/${tarball}"
|
||||||
|
curl -sSLO "${download_url}/${asc}"
|
||||||
|
gh release upload "${RELEASE_VERSION}" "${tarball}"
|
||||||
|
gh release upload "${RELEASE_VERSIOB}" "${asc}"
|
||||||
|
}
|
||||||
|
|
||||||
function main()
|
function main()
|
||||||
{
|
{
|
||||||
action="${1:-}"
|
action="${1:-}"
|
||||||
@ -103,6 +123,7 @@ function main()
|
|||||||
upload-kata-static-tarball) _upload_kata_static_tarball ;;
|
upload-kata-static-tarball) _upload_kata_static_tarball ;;
|
||||||
upload-versions-yaml-file) _upload_versions_yaml_file ;;
|
upload-versions-yaml-file) _upload_versions_yaml_file ;;
|
||||||
upload-vendored-code-tarball) _upload_vendored_code_tarball ;;
|
upload-vendored-code-tarball) _upload_vendored_code_tarball ;;
|
||||||
|
upload-libseccomp-tarball) _upload_libseccomp_tarball ;;
|
||||||
*) >&2 _die "Invalid argument" ;;
|
*) >&2 _die "Invalid argument" ;;
|
||||||
esac
|
esac
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user