Skip to content

Commit

Permalink
Merge pull request #5 from nagendraputhane/stable/2402
Browse files Browse the repository at this point in the history
ci: fix vpp package name in releases section
  • Loading branch information
kmonendra authored Sep 4, 2024
2 parents f5f754b + 2e77cdf commit 4f96fe8
Showing 1 changed file with 21 additions and 5 deletions.
26 changes: 21 additions & 5 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -64,9 +64,8 @@ jobs:
echo "PKG_POSTFIX=${PKG_POSTFIX}" >> "${PWD}/artifacts/env"
source "${PWD}/artifacts/env"
echo "NIGHTLY=${NIGHTLY}" >> $GITHUB_OUTPUT
echo "PKG_VERSION_NAME=${PKG_VERSION_NAME}" >> $GITHUB_OUTPUT
echo "MRVL_PKG_VERSION=${MRVL_PKG_VERSION}" >> $GITHUB_OUTPUT
echo "DPDK_PKG_VERSION=${DPDK_PKG_VERSION}" >> $GITHUB_OUTPUT
echo "DPDK_BASE_PKG_VERSION=${DPDK_BASE_PKG_VERSION}" >> $GITHUB_OUTPUT
- uses: uraimo/[email protected]
name: Build VPP and generate package
id: build
Expand Down Expand Up @@ -129,9 +128,11 @@ jobs:
apt-get install -y libconfuse-dev libelf-dev libffi7 libmnl-dev libnl-3-dev libnl-route-3-dev
apt-get install -y libnuma-dev libpcap-dev libssl-dev nasm ninja-build python3-all python3-dev
apt-get install -y python3-jsonschema python3-pip python3-ply python3-setuptools python3-venv
apt-get install -y python3-virtualenv tshark
apt-get install -y python3-virtualenv tshark lsb-release
run: |
source /artifacts/env
DISTRO=ubuntu-`lsb_release -rs`
echo "DISTRO=${DISTRO}" >> /artifacts/env
echo "cache_dir = /root/.ccache" > /root/.ccache/ccache.conf
ccache -p
git config --global --add safe.directory "${PWD}"
Expand Down Expand Up @@ -159,6 +160,8 @@ jobs:
echo "PKG_VERSION_NAME=${PKG_VERSION_NAME}" >> "$GITHUB_OUTPUT"
echo $MRVL_PKG_VERSION
echo "MRVL_PKG_VERSION=${MRVL_PKG_VERSION}" >> "$GITHUB_OUTPUT"
echo $DISTRO
echo "DISTRO=${DISTRO}" >> "$GITHUB_OUTPUT"
echo $PKG_POSTFIX
echo "PKG_POSTFIX=${PKG_POSTFIX}" >> "$GITHUB_OUTPUT"
[[ "$PKG_POSTFIX" == "-devel" ]] && TAG=devel || TAG=${PKG_VERSION_NAME}
Expand All @@ -169,11 +172,21 @@ jobs:
with:
name: vpp-${{ steps.artifacts.outputs.PKG_VERSION_NAME }}-cn10k${{ steps.artifacts.outputs.PKG_POSTFIX }}_${{ steps.artifacts.outputs.MRVL_PKG_VERSION }}_arm64.deb
path: ${{ github.workspace }}/artifacts/vpp-${{ steps.artifacts.outputs.PKG_VERSION_NAME }}-cn10k${{ steps.artifacts.outputs.PKG_POSTFIX }}_${{ steps.artifacts.outputs.MRVL_PKG_VERSION }}_arm64.deb
- name: Delete existing release
if: ${{ github.event_name == 'push' }}
env:
GH_TOKEN: ${{ github.token }}
run: |
if gh release view vpp-${{ steps.artifacts.outputs.PKG_VERSION_NAME }}-${{ steps.artifacts.outputs.MRVL_PKG_VERSION }}-${{ steps.artifacts.outputs.DISTRO }}-${{ steps.artifacts.outputs.TAG }}; then
gh release delete vpp-${{ steps.artifacts.outputs.PKG_VERSION_NAME }}-${{ steps.artifacts.outputs.MRVL_PKG_VERSION }}-${{ steps.artifacts.outputs.DISTRO }}-${{ steps.artifacts.outputs.TAG }} --cleanup-tag -y
else
echo "Release not found"
fi
- name: Release VPP cn10k package
uses: softprops/[email protected]
if: ${{ github.event_name == 'push' }}
with:
tag_name: ${{ steps.artifacts.outputs.TAG }}
tag_name: vpp-${{ steps.artifacts.outputs.PKG_VERSION_NAME }}-${{ steps.artifacts.outputs.MRVL_PKG_VERSION }}-${{ steps.artifacts.outputs.DISTRO }}-${{ steps.artifacts.outputs.TAG }}
files: |
${{ github.workspace }}/artifacts/vpp-${{ steps.artifacts.outputs.PKG_VERSION_NAME }}-cn10k${{ steps.artifacts.outputs.PKG_POSTFIX }}_${{ steps.artifacts.outputs.MRVL_PKG_VERSION }}_arm64.deb
- name: Dispatch package update event
Expand All @@ -185,4 +198,7 @@ jobs:
-H "Authorization: Bearer ${{ secrets.PPA_REPO_SECRET }}" \
-H "X-GitHub-Api-Version: 2022-11-28" \
https://api.github.com/repos/marvellembeddedprocessors/packages/dispatches \
-d '{"event_type":"dispatch-event", "client_payload": {"package" : "vpp", "tag": "${{ steps.artifacts.outputs.TAG }}", "dpdk_tag" : "${{ steps.version.outputs.DPDK_PKG_VERSION }}", "has_dpdk" : "true"}}'
-d '{"event_type":"dispatch-event", "client_payload": {"package" : "vpp",
"tag": "vpp-${{ steps.artifacts.outputs.PKG_VERSION_NAME }}-${{ steps.artifacts.outputs.MRVL_PKG_VERSION }}-${{ steps.artifacts.outputs.DISTRO }}-${{ steps.artifacts.outputs.TAG }}",
"dpdk_tag" : "dpdk-${{ steps.version.outputs.DPDK_BASE_PKG_VERSION }}_${{ steps.version.outputs.DPDK_PKG_VERSION }}-${{ steps.artifacts.outputs.DISTRO }}-${{ steps.version.outputs.DPDK_PKG_VERSION }}",
"has_dpdk" : "true", "distro" : "${{ steps.artifacts.outputs.DISTRO }}"}}'

0 comments on commit 4f96fe8

Please sign in to comment.