Skip to content

prepare 0.24.7 release #394

prepare 0.24.7 release

prepare 0.24.7 release #394

Workflow file for this run

# This is a basic workflow to help you get started with Actions
name: grafana Build
# Controls when the action will run.
on:
# Triggers the workflow on push or pull request events but only for the master branch
push:
branches: [ main ]
tags:
- "v*"
paths:
- .github/workflows/grafana-docker.yml
- grafana/**
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
vwsfriend-grafana:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Docker meta
id: meta
uses: docker/metadata-action@v5
with:
images: |
tillsteinbach/vwsfriend-grafana
ghcr.io/tillsteinbach/vwsfriend-grafana
tags: |
type=edge,
type=pep440,pattern={{version}}
- name: Version from pushed tag
if: startsWith( github.ref, 'refs/tags/v' )
run: |
# from refs/tags/v1.2.3 get 1.2.3
echo "version=$(echo $GITHUB_REF | sed 's#.*/v##')" >> $GITHUB_ENV
- name: Autobump version
if: startsWith( github.ref, 'refs/tags/v' )
working-directory: grafana
run: |
PLACEHOLDER=" \"content\": \"VWsFriend version: \[0.0.0dev\](https://github.com/tillsteinbach/VWsFriend/)\","
REPLACEMENT=" \"content\": \"VWsFriend version: \[${{ env.version }}\](https://github.com/tillsteinbach/VWsFriend/releases/tag/v${{ env.version }})\","
VERSION_FILE="dashboards/vwsfriend/VWsFriend/overview.json"
# ensure the placeholder is there. If grep doesn't find the placeholder
# it exits with exit code 1 and github actions aborts the build.
grep "$PLACEHOLDER" "$VERSION_FILE"
sed -i "s|$PLACEHOLDER|$REPLACEMENT|g" "$VERSION_FILE"
grep "$REPLACEMENT" "$VERSION_FILE"
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Setup Docker Buildx
uses: docker/setup-buildx-action@v3.6.1
- name: Login to DockerHub
uses: docker/login-action@v3.3.0
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Login to GitHub Container Registry
uses: docker/login-action@v3.3.0
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and push
id: docker_build
uses: docker/build-push-action@v6.7.0
with:
context: grafana
push: ${{ github.event_name != 'pull_request' }}
platforms: linux/amd64,linux/arm/v7,linux/arm64
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
cache-from: type=gha
cache-to: type=gha,mode=max