order matters
All checks were successful
build & package varnish exporter / build (push) Successful in 18s
All checks were successful
build & package varnish exporter / build (push) Successful in 18s
This commit is contained in:
parent
5cb0a154e7
commit
407133ca97
@ -4,13 +4,16 @@ on:
|
|||||||
push:
|
push:
|
||||||
tags:
|
tags:
|
||||||
- '*'
|
- '*'
|
||||||
branches:
|
|
||||||
- "main"
|
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
build:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
|
- name: Get version
|
||||||
|
run: |
|
||||||
|
TAG=${{ gitea.ref_name }}
|
||||||
|
echo "VERSION=${TAG#v}" | tee -a $GITEA_ENV
|
||||||
|
|
||||||
- name: Setup go
|
- name: Setup go
|
||||||
uses: actions/setup-go@v4
|
uses: actions/setup-go@v4
|
||||||
with:
|
with:
|
||||||
@ -22,7 +25,6 @@ jobs:
|
|||||||
- 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: GOOS=linux GOARCH=amd64 go build -o ../bin/prometheus-varnish-exporter-amd64
|
||||||
working-directory: varnish
|
working-directory: varnish
|
||||||
continue-on-error: true
|
|
||||||
|
|
||||||
- name: Create deb dir tree
|
- name: Create deb dir tree
|
||||||
run: |
|
run: |
|
||||||
@ -33,11 +35,6 @@ jobs:
|
|||||||
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
|
||||||
|
|
||||||
- name: Get version
|
|
||||||
run: |
|
|
||||||
TAG=${{ gitea.ref_name }}
|
|
||||||
echo "VERSION=${TAG#v}" | tee -a $GITEA_ENV
|
|
||||||
|
|
||||||
- name: Prepare amd64 control file
|
- name: Prepare amd64 control file
|
||||||
run: |
|
run: |
|
||||||
echo "Package: varnish-exporter" > varnish-exporter-amd64/DEBIAN/control
|
echo "Package: varnish-exporter" > varnish-exporter-amd64/DEBIAN/control
|
||||||
@ -51,15 +48,6 @@ jobs:
|
|||||||
run: |
|
run: |
|
||||||
dpkg -b varnish-exporter-amd64 bin/prometheus-varnish-exporter-amd64.deb
|
dpkg -b varnish-exporter-amd64 bin/prometheus-varnish-exporter-amd64.deb
|
||||||
|
|
||||||
- name: Create release
|
|
||||||
uses: https://gitea.com/actions/release-action@main
|
|
||||||
with:
|
|
||||||
draft: false
|
|
||||||
prerelease: false
|
|
||||||
files: |-
|
|
||||||
bin/**
|
|
||||||
api_key: "${{ secrets.RELEASE_TOKEN }}"
|
|
||||||
|
|
||||||
- name: Prepare apt repo upload
|
- name: Prepare apt repo upload
|
||||||
run: |
|
run: |
|
||||||
mv bin/prometheus-varnish-exporter-amd64.deb prometheus-varnish-exporter_$VERSION-1_amd64.deb
|
mv bin/prometheus-varnish-exporter-amd64.deb prometheus-varnish-exporter_$VERSION-1_amd64.deb
|
||||||
@ -68,3 +56,14 @@ jobs:
|
|||||||
run: |
|
run: |
|
||||||
curl -s -u "${{ secrets.PACKAGE_TOKEN }}" --upload-file prometheus-varnish-exporter_$VERSION-1_amd64.deb \
|
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
|
https://git.brainsys.io/api/packages/packages/debian/pool/stable/main/upload
|
||||||
|
|
||||||
|
- name: Create release
|
||||||
|
uses: https://gitea.com/actions/release-action@main
|
||||||
|
with:
|
||||||
|
draft: false
|
||||||
|
prerelease: false
|
||||||
|
files: |-
|
||||||
|
bin/**
|
||||||
|
api_key: "${{ secrets.RELEASE_TOKEN }}"
|
||||||
|
continue-on-error: true
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user