File tree Expand file tree Collapse file tree 1 file changed +36
-3
lines changed
Expand file tree Collapse file tree 1 file changed +36
-3
lines changed Original file line number Diff line number Diff line change 1- name : Publish Docker Image
1+ name : Publish Docker Image and Debian Package
22
33on :
44 release :
55 types : [published]
66
77jobs :
8- build-and-publish :
8+ build-and-publish-docker :
99 runs-on : ubuntu-latest
1010 permissions :
1111 contents : read
3434 context : .
3535 push : true
3636 tags : ${{ steps.meta.outputs.tags }}
37- labels : ${{ steps.meta.outputs.labels }}
37+ labels : ${{ steps.meta.outputs.labels }}
38+
39+ build-and-upload-deb :
40+ runs-on : ubuntu-latest
41+ permissions :
42+ contents : write # Needed to upload release assets
43+
44+ steps :
45+ - name : Checkout repository
46+ uses : actions/checkout@v4
47+
48+ - name : Install Go
49+ uses : actions/setup-go@v5
50+ with :
51+ go-version : ' 1.22'
52+
53+ - name : Set release version in build script
54+ run : |
55+ # The tag is like 'v0.2.2', we just want '0.2.2'
56+ RELEASE_VERSION=${{ github.ref_name }}
57+ VERSION_NUMBER=${RELEASE_VERSION#v}
58+ sed -i "s/^VERSION=.*/VERSION=\"${VERSION_NUMBER}\"/" build_packages.sh
59+
60+ - name : Build the Debian package
61+ run : bash build_packages.sh
62+
63+ - name : Upload Debian package to release
64+ uses : svenstaro/upload-release-action@v2
65+ with :
66+ repo_token : ${{ secrets.GITHUB_TOKEN }}
67+ file : docker-ai_*.deb
68+ asset_name : docker-ai_${{ github.ref_name }}_amd64.deb
69+ tag : ${{ github.ref_name }}
70+ overwrite : true
You can’t perform that action at this time.
0 commit comments