From 6d16aa21877287b3828339f4f80486610c739dd6 Mon Sep 17 00:00:00 2001 From: Ludovic Cartier Date: Mon, 21 Jul 2025 23:51:35 +0200 Subject: [PATCH] orders matters --- .gitea/workflows/varnish-exporter.yml | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/.gitea/workflows/varnish-exporter.yml b/.gitea/workflows/varnish-exporter.yml index 2c134b7..e37d787 100644 --- a/.gitea/workflows/varnish-exporter.yml +++ b/.gitea/workflows/varnish-exporter.yml @@ -23,10 +23,10 @@ jobs: LATEST=`curl --silent https://api.github.com/repos/jonnenauha/prometheus_varnish_exporter/releases/latest | jq -r .tag_name | sed "s/v//"` echo "current registered version: $CURRENT" echo "latest version on remote repo: $LATEST" + echo "version=$LATEST" >> $GITHUB_OUTPUT if awk "BEGIN {exit !($LATEST > $CURRENT)}"; then echo $LATEST > .version echo "build=true" >> $GITHUB_OUTPUT - echo "version=$LATEST" >> $GITHUB_OUTPUT else echo "build=false" >> $GITHUB_OUTPUT fi @@ -85,7 +85,7 @@ jobs: - name: Prepare amd64 control file run: | echo "Package: varnish-exporter" > varnish-exporter-amd64/DEBIAN/control - echo "Version: $VERSION" >> varnish-exporter-amd64/DEBIAN/control + echo "Version: ${{ env.VERSION }}" >> varnish-exporter-amd64/DEBIAN/control echo "Maintainer: Ludovic Cartier " >> 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 @@ -93,7 +93,7 @@ jobs: - name: Build deb files run: | - dpkg -b varnish-exporter-amd64 bin/prometheus-varnish-exporter_$VERSION-1_amd64.deb + dpkg -b varnish-exporter-amd64 bin/prometheus-varnish-exporter_${{ env.VERSION }}-1_amd64.deb # - name: Prepare apt repo upload # run: | @@ -101,13 +101,13 @@ jobs: - name: Release packages 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_"${{ env.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: ${{ env.VERSION}} + tag_name: "${{ env.VERSION }}" files: |- bin/** token: "${{ secrets.RELEASE_TOKEN }}" @@ -115,8 +115,8 @@ jobs: - name: Send notification to mattermost uses: rtCamp/action-slack-notify@v2 env: - SLACK_WEBHOOK: ${{ secrets.MATTERMOST_WEBHOOK }} + SLACK_WEBHOOK: "${{ secrets.MATTERMOST_WEBHOOK }}" SLACK_USERNAME: gitea-bot SLACK_CHANNEL: gitea-actions - SLACK_COLOR: ${{ job.status }} + SLACK_COLOR: "${{ job.status }}" SLACK_CUSTOM_PAYLOAD: '{"username": "gitea-bot", "icon_url": "https://w7.pngwing.com/pngs/940/571/png-transparent-gitea-hd-logo-thumbnail.png", "text": "varnish-exporter build has just finished in version $VERSION !"}'