Skip to content

Commit b468682

Browse files
committed
build against multiple grafana versions
1 parent 7973bdd commit b468682

3 files changed

Lines changed: 14 additions & 5 deletions

File tree

.github/workflows/publish.yml

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,11 @@ on:
88
jobs:
99
docker:
1010
runs-on: ubuntu-latest
11+
12+
strategy:
13+
matrix:
14+
grafana_version: ["11.6", "12.2"]
15+
1116
steps:
1217
- uses: actions/checkout@v2
1318

@@ -16,7 +21,7 @@ jobs:
1621
uses: docker/setup-buildx-action@v1
1722

1823
- name: Build the image
19-
run: make grafana-build
24+
run: make grafana-build GRAFANA_VERSION=${{ matrix.grafana_version }}
2025

2126
- name: Login to DockerHub
2227
uses: docker/login-action@v1
@@ -30,7 +35,8 @@ jobs:
3035
with:
3136
images: enapter/grafana-plugins
3237
tags: |
33-
type=ref,event=tag
38+
type=raw,value=${{ matrix.grafana_version }}
39+
type=raw,value=${{ matrix.grafana_version }}-${{ github.ref_name }}
3440
3541
- name: Build and push to DockerHub
3642
uses: docker/build-push-action@v2
@@ -53,7 +59,8 @@ jobs:
5359
with:
5460
images: docker.enapter.com/grafana/plugins
5561
tags: |
56-
type=ref,event=tag
62+
type=raw,value=${{ matrix.grafana_version }}
63+
type=raw,value=${{ matrix.grafana_version }}-${{ github.ref_name }}
5764
5865
- name: Build and push to Enapter DockerHub
5966
uses: docker/build-push-action@v2

Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
ARG GRAFANA_VERSION=11.6.2
1+
ARG GRAFANA_VERSION=11.6
22

33
FROM grafana/grafana:${GRAFANA_VERSION}
44

Makefile

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,11 +24,13 @@ enapter-grafana-plugins.tar.gz: $(PLUGINS)
2424
rm -f $@
2525
tar --create --gzip --file $@ $(addsuffix /dist,$^)
2626

27-
GRAFANA_TAG ?= enapter/grafana-plugins:dev
27+
GRAFANA_VERSION ?= 11.6
28+
GRAFANA_TAG ?= enapter/grafana-plugins:$(GRAFANA_VERSION)-dev
2829

2930
.PHONY: grafana-build
3031
grafana-build: $(PLUGINS)
3132
$(DOCKER_BUILD) \
33+
--build-arg GRAFANA_VERSION=$(GRAFANA_VERSION) \
3234
--tag $(GRAFANA_TAG) \
3335
.
3436

0 commit comments

Comments
 (0)