Skip to content

Commit

Permalink
attach .deb files to releases
Browse files Browse the repository at this point in the history
  • Loading branch information
DigitalOceanDaniel committed Feb 7, 2025
1 parent 3363579 commit 83de4ec
Show file tree
Hide file tree
Showing 4 changed files with 43 additions and 0 deletions.
26 changes: 26 additions & 0 deletions .github/workflows/build-release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,14 @@ jobs:
sudo dpkg -I ../*.deb
sudo dpkg --contents ../*.deb
mv ../do-dcgm-exporter_*.deb .
# add focal/jammy/noble suffix to be able to distinguish when uploading to releases
for file in do-dcgm-exporter_*.deb; do
new_name="${file%%.deb*}-$OS_NAME.deb"
mv "$file" "$new_name"
done
ls -lh
- uses: actions/upload-artifact@v4
with:
name: pool-${{ env.OS_NAME }}
Expand Down Expand Up @@ -110,6 +118,24 @@ jobs:
- name: "download existing pool .debs"
run: |
ls -la pool/*
- name: Upload focal .deb to release
uses: AButler/[email protected]
with:
files: 'pool/focal/*.deb'
repo-token: ${{ secrets.GITHUB_TOKEN }}
release-tag: ${{ github.ref_name }}
- name: Upload jammy .deb to release
uses: AButler/[email protected]
with:
files: 'pool/jammy/*.deb'
repo-token: ${{ secrets.GITHUB_TOKEN }}
release-tag: ${{ github.ref_name }}
- name: Upload noble .deb to release
uses: AButler/[email protected]
with:
files: 'pool/noble/*.deb'
repo-token: ${{ secrets.GITHUB_TOKEN }}
release-tag: ${{ github.ref_name }}
- uses: ./.github/actions/deb-repo
with:
repo_root: repo_root
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
.idea/
.DS_STORE
bin/
hack/tools/bin
dev
1 change: 1 addition & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ install:
mkdir -p $(DESTDIR)/etc/apt/sources.list.d/
cp public.gpg $(DESTDIR)/etc/apt/trusted.gpg.d/do-dcgm-exporter.gpg
echo "deb https://digitalocean.github.io/do-dcgm-exporter/ubuntu/ $(DIST) extras" > $(DESTDIR)/etc/apt/sources.list.d/do-dcgm-exporter.list
cp hack/systemd/do-dcgm-exporter.service /etc/systemd/system/do-dcgm-exporter.service

debian/changelog:
debian/doch.pl > debian/changelog
Expand Down
15 changes: 15 additions & 0 deletions hack/systemd/do-dcgm-exporter.service
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
[Unit]
Description=DigitalOcean DCGM Exporter
After=network.target

[Service]
User=root
Group=root
ExecStart=/opt/digitalocean/bin/do-dcgm-exporter
Restart=on-failure
RestartSec=5
StandardOutput=journal
StandardError=journal

[Install]
WantedBy=multi-user.target

0 comments on commit 83de4ec

Please sign in to comment.