-
Notifications
You must be signed in to change notification settings - Fork 1
74 lines (71 loc) · 2.94 KB
/
push-package.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
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"
latest: ${{ steps.version.outputs.TAG == 'latest' && 'true' || 'false' }}
tag: "${{ steps.version.outputs.TAG == 'latest' && '' || 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"
latest: ${{ steps.version.outputs.TAG == 'latest' && 'true' || 'false' }}
tag: "${{ steps.version.outputs.TAG == 'latest' && '' || steps.version.outputs.TAG }}"
fileName: "*.deb"
- name: Commit packages
env:
EMAIL: pbhagavatula@marvell.com
run: |
ls -alh
git config --global user.name 'Pavan Nikhilesh'
git config --global user.email "${EMAIL}"
mkdir -p ${PWD}/ubuntu
mv *.deb ${PWD}/ubuntu/.
cd ${PWD}/ubuntu
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 commit -sam 'Package update : ${{ steps.version.outputs.TAG }}'
git push