Skip to content

build

build #37

Workflow file for this run

name: build
on:
push:
branches:
- master
schedule:
- cron: "0 0 * * 0"
jobs:
docker:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Set up QEMU
uses: docker/setup-qemu-action@v1
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
- name: Login to GitHub Container Registry
uses: docker/login-action@v1
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Builds
run: |
git clone --depth 1 https://github.com/grafana/grafana.git
cd grafana/packaging/docker/custom
export GRAFANA_VERSION_V9=$(curl -Ls https://api.github.com/repos/grafana/grafana/releases | jq -r '.[].name' | grep -v 'unreleased' | grep '^9.' | sort --version-sort | tail -n 1 | awk '{print $1}')
export GRAFANA_VERSION_V10=$(curl -Ls https://api.github.com/repos/grafana/grafana/releases | jq -r '.[].name' | grep -v 'unreleased' | grep '^10.' | sort --version-sort | tail -n 1 | awk '{print $1}')
docker build \
--build-arg "GRAFANA_VERSION=$GRAFANA_VERSION_V9" \
--build-arg "GF_INSTALL_PLUGINS=grafana-clickhouse-datasource,grafana-sentry-datasource,grafana-mqtt-datasource,grafana-opensearch-datasource,grafana-googlesheets-datasource,grafana-worldmap-panel,grafana-clock-panel,grafana-polystat-panel" \
-t ghcr.io/aasaam/grafana:9 .
docker build \
--build-arg "GRAFANA_VERSION=$GRAFANA_VERSION_V10" \
--build-arg "GF_INSTALL_PLUGINS=grafana-clickhouse-datasource,grafana-sentry-datasource,grafana-mqtt-datasource,grafana-opensearch-datasource,grafana-googlesheets-datasource,grafana-worldmap-panel,grafana-clock-panel,grafana-polystat-panel" \
-t ghcr.io/aasaam/grafana:10 .
docker push ghcr.io/aasaam/grafana:9
docker push ghcr.io/aasaam/grafana:10
docker tag ghcr.io/aasaam/grafana:10 ghcr.io/aasaam/grafana:latest
docker push ghcr.io/aasaam/grafana:latest