You've already forked prometheus-exporters
add arm64
This commit is contained in:
@@ -73,7 +73,7 @@ jobs:
|
|||||||
build:
|
build:
|
||||||
needs: validate
|
needs: validate
|
||||||
if: needs.validate.outputs.build == 'true'
|
if: needs.validate.outputs.build == 'true'
|
||||||
#timeout-minutes: 2
|
timeout-minutes: 2
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
@@ -92,17 +92,24 @@ jobs:
|
|||||||
run: git clone https://github.com/jonnenauha/prometheus_varnish_exporter varnish
|
run: git clone https://github.com/jonnenauha/prometheus_varnish_exporter varnish
|
||||||
|
|
||||||
- name: Build varnish exporter for GNU/Linux / amd64
|
- name: Build varnish exporter for GNU/Linux / amd64
|
||||||
run: GOOS=linux GOARCH=amd64 go build -o ../bin/prometheus-varnish-exporter-amd64
|
run: CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -ldflags="-s -w" -o ../bin/prometheus-varnish-exporter-amd64
|
||||||
|
working-directory: varnish
|
||||||
|
|
||||||
|
- name: Build varnish exporter for GNU/Linux / arm64
|
||||||
|
run: CGO_ENABLED=0 GOOS=linux GOARCH=arm64 go build -ldflags="-s -w" -o ../bin/prometheus-varnish-exporter-arm64
|
||||||
working-directory: varnish
|
working-directory: varnish
|
||||||
|
|
||||||
- name: Create deb dir tree
|
- name: Create deb dir tree
|
||||||
run: |
|
run: |
|
||||||
mkdir -p varnish-exporter-amd64/usr/bin
|
mkdir -p varnish-exporter-amd64/usr/bin
|
||||||
mkdir -p varnish-exporter-amd64/DEBIAN
|
mkdir -p varnish-exporter-amd64/DEBIAN
|
||||||
|
mkdir -p varnish-exporter-arm64/usr/bin
|
||||||
|
mkdir -p varnish-exporter-arm64/DEBIAN
|
||||||
|
|
||||||
- name: Copy binaries
|
- name: Copy binaries
|
||||||
run: |
|
run: |
|
||||||
cp bin/prometheus-varnish-exporter-amd64 varnish-exporter-amd64/usr/bin/prometheus-varnish-exporter
|
cp bin/prometheus-varnish-exporter-amd64 varnish-exporter-amd64/usr/bin/prometheus-varnish-exporter
|
||||||
|
cp bin/prometheus-varnish-exporter-arm64 varnish-exporter-arm64/usr/bin/prometheus-varnish-exporter
|
||||||
|
|
||||||
- name: Prepare amd64 control file
|
- name: Prepare amd64 control file
|
||||||
run: |
|
run: |
|
||||||
@@ -113,14 +120,26 @@ jobs:
|
|||||||
echo "Homepage: https://git.brainsys.io/packages/prometheus-exporters" >> varnish-exporter-amd64/DEBIAN/control
|
echo "Homepage: https://git.brainsys.io/packages/prometheus-exporters" >> varnish-exporter-amd64/DEBIAN/control
|
||||||
echo "Description: Prometheus Varnish Exporter package for GNU/Linux Debian" >> varnish-exporter-amd64/DEBIAN/control
|
echo "Description: Prometheus Varnish Exporter package for GNU/Linux Debian" >> varnish-exporter-amd64/DEBIAN/control
|
||||||
|
|
||||||
|
- name: Prepare arm64 control file
|
||||||
|
run: |
|
||||||
|
echo "Package: prometheus-varnish-exporter" > varnish-exporter-arm64/DEBIAN/control
|
||||||
|
echo "Version: $VERSION" >> varnish-exporter-arm64/DEBIAN/control
|
||||||
|
echo "Maintainer: Ludovic Cartier <ludovic.cartier@brainsys.io>" >> varnish-exporter-arm64/DEBIAN/control
|
||||||
|
echo "Architecture: arm64" >> varnish-exporter-arm64/DEBIAN/control
|
||||||
|
echo "Homepage: https://git.brainsys.io/packages/prometheus-exporters" >> varnish-exporter-arm64/DEBIAN/control
|
||||||
|
echo "Description: Prometheus Varnish Exporter package for GNU/Linux Debian" >> varnish-exporter-arm64/DEBIAN/control
|
||||||
|
|
||||||
- name: Build deb files
|
- name: Build deb files
|
||||||
run: |
|
run: |
|
||||||
dpkg -b varnish-exporter-amd64 bin/prometheus-varnish-exporter_$VERSION-1_amd64.deb
|
dpkg -b varnish-exporter-amd64 bin/prometheus-varnish-exporter_$VERSION-1_amd64.deb
|
||||||
|
dpkg -b varnish-exporter-arm64 bin/prometheus-varnish-exporter_$VERSION-1_arm64.deb
|
||||||
|
|
||||||
- name: Release packages
|
- name: Release packages
|
||||||
run: |
|
run: |
|
||||||
curl -s -u "${{ secrets.PACKAGE_TOKEN }}" --upload-file bin/prometheus-varnish-exporter_$VERSION-1_amd64.deb \
|
curl -s -u "${{ secrets.PACKAGE_TOKEN }}" --upload-file bin/prometheus-varnish-exporter_$VERSION-1_amd64.deb \
|
||||||
https://git.brainsys.io/api/packages/packages/debian/pool/stable/main/upload
|
https://git.brainsys.io/api/packages/packages/debian/pool/stable/main/upload
|
||||||
|
curl -s -u "${{ secrets.PACKAGE_TOKEN }}" --upload-file bin/prometheus-varnish-exporter_$VERSION-1_arm64.deb \
|
||||||
|
https://git.brainsys.io/api/packages/packages/debian/pool/stable/main/upload
|
||||||
|
|
||||||
- name: Create release
|
- name: Create release
|
||||||
uses: akkuman/gitea-release-action@v1
|
uses: akkuman/gitea-release-action@v1
|
||||||
|
|||||||
Reference in New Issue
Block a user