Compare commits

..

No commits in common. "main" and "v0.2" have entirely different histories.
main ... v0.2

View File

@ -1,21 +1,16 @@
name: build & package varnish exporter
on:
schedule:
- cron: '0 5 * * *'
push:
tags:
- '*'
branches:
- "main"
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Get version
run: |
TAG=${{ gitea.ref_name }}
echo "VERSION=${TAG#v}" | tee -a $GITEA_ENV
- name: Setup go
uses: actions/setup-go@v4
with:
@ -27,6 +22,7 @@ jobs:
- name: Build varnish exporter for GNU/Linux / amd64
run: GOOS=linux GOARCH=amd64 go build -o ../bin/prometheus-varnish-exporter-amd64
working-directory: varnish
continue-on-error: true
- name: Create deb dir tree
run: |
@ -37,6 +33,11 @@ jobs:
run: |
cp bin/prometheus-varnish-exporter-amd64 varnish-exporter-amd64/usr/bin/prometheus-varnish-exporter
- name: Get version
run: |
TAG=${{ gitea.ref_name }}
echo "VERSION=${TAG#v}" | tee -a $GITEA_ENV
- name: Prepare amd64 control file
run: |
echo "Package: varnish-exporter" > varnish-exporter-amd64/DEBIAN/control
@ -50,15 +51,6 @@ jobs:
run: |
dpkg -b varnish-exporter-amd64 bin/prometheus-varnish-exporter-amd64.deb
- name: Prepare apt repo upload
run: |
mv bin/prometheus-varnish-exporter-amd64.deb prometheus-varnish-exporter_$VERSION-1_amd64.deb
- name: Release packages
run: |
curl -s -u "${{ secrets.PACKAGE_TOKEN }}" --upload-file prometheus-varnish-exporter_$VERSION-1_amd64.deb \
https://git.brainsys.io/api/packages/packages/debian/pool/stable/main/upload
- name: Create release
uses: https://gitea.com/actions/release-action@main
with:
@ -67,5 +59,12 @@ jobs:
files: |-
bin/**
api_key: "${{ secrets.RELEASE_TOKEN }}"
continue-on-error: true
- name: Prepare apt repo upload
run: |
mv bin/prometheus-varnish-exporter-amd64.deb prometheus-varnish-exporter_$VERSION-1_amd64.deb
- name: Release packages
run: |
curl -s -u "${{ secrets.PACKAGE_TOKEN }}" --upload-file prometheus-varnish-exporter_$VERSION-1_amd64.deb \
https://git.brainsys.io/api/packages/packages/debian/pool/stable/main/upload