simplify task && set env var VERSION from jobs.validate.outputs.version
Some checks failed
/ validate (push) Successful in 4s
/ build (push) Failing after 17s

This commit is contained in:
Ludovic Cartier
2025-07-21 23:21:30 +02:00
parent ce65987ce9
commit 000db93498
2 changed files with 9 additions and 10 deletions

View File

@@ -58,9 +58,8 @@ jobs:
- name: Set version to env vars
run: |
echo "VERSION=`cat .version`" >> $GITHUB_ENV
echo "VERSION="${{ needs.validate.outputs.version }} >> $GITHUB_ENV
echo "version: $VERSION"
echo "${{ needs.validate.outputs.version }}"
- name: Setup go
uses: actions/setup-go@v4
@@ -90,25 +89,25 @@ jobs:
echo "Maintainer: Ludovic Cartier <ludovic.cartier@alterway.fr>" >> varnish-exporter-amd64/DEBIAN/control
echo "Architecture: amd64" >> varnish-exporter-amd64/DEBIAN/control
echo "Homepage: https://git.brainsys.io/packages/prometheus-exporters" >> varnish-exporter-amd64/DEBIAN/control
echo "Description: Prometheus Exporters 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: Build deb files
run: |
dpkg -b varnish-exporter-amd64 bin/prometheus-varnish-exporter-amd64.deb
dpkg -b varnish-exporter-amd64 bin/prometheus-varnish-exporter_$VERSION-1_amd64.deb
- name: Prepare apt repo upload
run: |
mv bin/prometheus-varnish-exporter-amd64.deb prometheus-varnish-exporter_$VERSION-1_amd64.deb
# - name: Prepare apt repo upload
# run: |
# mv bin/prometheus-varnish-exporter-amd64.deb bin/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 \
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
- name: Create release
uses: akkuman/gitea-release-action@v1
with:
tag_name: "${{ needs.validate.outputs.version }}"
tag_name: "$VERSION"
files: |-
bin/**
token: "${{ secrets.RELEASE_TOKEN }}"