Skip to content

Commit

Permalink
Initialize LFS repo for storing packages
Browse files Browse the repository at this point in the history
Initialize LFS repo for storing packages.
Create README.md.
Initialize github workflow for building and deploying
debian packages.

Signed-off-by: Pavan Nikhilesh <pbhagavatula@marvell.com>
  • Loading branch information
PavanNikhilesh committed Jun 7, 2024
0 parents commit 7b3cc14
Show file tree
Hide file tree
Showing 2 changed files with 83 additions and 0 deletions.
1 change: 1 addition & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
*.deb filter=lfs diff=lfs merge=lfs -text
82 changes: 82 additions & 0 deletions .github/workflows/push-package.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,82 @@
name: Commit and deploy package

on:
repository_dispatch:
types: [dispatch-event]
permissions:
id-token: write
contents: write

jobs:
deploy-debian-packages:
runs-on: ubuntu-latest

steps:
- name: Checkout sources
uses: actions/checkout@v4
with:
lfs: true
- name: Set Package version
id: version
run: |
echo 'TAG=${{ github.event.client_payload.tag }}' >> $GITHUB_OUTPUT
echo 'PACKAGE=${{ github.event.client_payload.package }}' >> $GITHUB_OUTPUT
echo 'HAS_DPDK=${{ github.event.client_payload.has_dpdk }}' >> $GITHUB_OUTPUT
echo 'DPDK_TAG=${{ github.event.client_payload.dpdk_tag }}' >> $GITHUB_OUTPUT
- name: Import GPG Key
uses: crazy-max/ghaction-import-gpg@v6.1.0
with:
gpg_private_key: ${{ secrets.GPG_PRIVATE_KEY }}
passphrase: ${{ secrets.GPG_PASSPHRASE }}
- name: Download DPDK package
uses: robinraju/release-downloader@v1.10
if: ${{ steps.version.outputs.HAS_DPDK == 'true' }}
with:
repository: "MarvellEmbeddedProcessors/marvell-dpdk"
tag: "${{ steps.version.outputs.DPDK_TAG }}"
fileName: "*.deb"
- name: Download DAO package
uses: robinraju/release-downloader@v1.10
if: ${{ steps.version.outputs.PACKAGE == 'dao' }}
with:
repository: "MarvellEmbeddedProcessors/dpu-accelerator-offload"
tag: "${{ steps.version.outputs.TAG }}"
fileName: "*.deb"
- name: Download OVS package
uses: robinraju/release-downloader@v1.10
if: ${{ steps.version.outputs.PACKAGE == 'ovs' }}
with:
repository: "MarvellEmbeddedProcessors/marvell-ovs"
tag: "${{ steps.version.outputs.TAG }}"
fileName: "*.deb"
- name: Download VPP package
uses: robinraju/release-downloader@v1.10
if: ${{ steps.version.outputs.PACKAGE == 'vpp' }}
with:
repository: "MarvellEmbeddedProcessors/vpp"
tag: "${{ steps.version.outputs.TAG }}"
fileName: "*.deb"
- name: Commit packages
env:
EMAIL: pbhagavatula@marvell.com
run: |
ls -alh
git config --global user.name 'Github-accelerator-bot'
git config --global user.email "github-bot-accelerator@marvell.com"
mkdir -p ${PWD}/ubuntu-22.04
mv *.deb ${PWD}/ubuntu-22.04/.
cd ${PWD}/ubuntu-22.04
gpg --armor --export "${EMAIL}" > dao.gpg
dpkg-scanpackages --multiversion . > Packages
gzip -k -f Packages
apt-ftparchive release . > Release
gpg --default-key "${EMAIL}" -abs -o - Release > Release.gpg
gpg --default-key "${EMAIL}" --clearsign -o - Release > InRelease
echo "deb [signed-by=/etc/apt/keyrings/dao.gpg] https://marvellembeddedprocessors.github.io/packages/ubuntu ./" > dao.list
cd -
git add .
git log -1 --pretty=%B > msg
sed "/^Signed-off-by:/d" msg > msg
echo "`date "+%F %H:%M` "'${{ steps.version.outputs.TAG }}' >> msg
git commit --amend -s --message "$(cat msg)"
git push

0 comments on commit 7b3cc14

Please sign in to comment.