Skip to content

Commit

Permalink
test: grafana publish
Browse files Browse the repository at this point in the history
publish grafana in ci pipeline
  • Loading branch information
jlangy committed Oct 25, 2024
1 parent 7365678 commit 30e318e
Showing 1 changed file with 52 additions and 0 deletions.
52 changes: 52 additions & 0 deletions .github/workflows/publish-grafana-image.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
name: Create and publish SSO Aggregator

on:
push:
branches:
- main
- dev
- ssoteam-2010
paths:
- grafana-config/*

env:
GITHUB_REGISTRY: ghcr.io
IMAGE_NAME: bcgov/grafana

jobs:
build-and-push-image:
runs-on: ubuntu-22.04
permissions:
contents: read
packages: write

steps:
- uses: hmarr/debug-action@v3
- uses: actions/checkout@v4

- name: Setup Tools
uses: ./.github/actions/setup-tools

- name: Log in to the GitHub Container registry
uses: docker/login-action@v3
with:
registry: ${{ env.GITHUB_REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@v5
with:
images: ${{ env.GITHUB_REGISTRY }}/${{ env.IMAGE_NAME }}
tags: |
type=ref,event=branch
type=sha,format=long
- name: Build and push Docker image
uses: docker/build-push-action@v5
with:
context: aggregator
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}

0 comments on commit 30e318e

Please sign in to comment.