Skip to content

Merge pull request #52 from bcgov/ssoteam-2010 #3

Merge pull request #52 from bcgov/ssoteam-2010

Merge pull request #52 from bcgov/ssoteam-2010 #3

name: Create and publish SSO Grafana
on:
push:
branches:
- main
- dev
paths:
- grafana-config/*
- .github/workflows/publish-grafana-image.yaml
env:
GITHUB_REGISTRY: ghcr.io
IMAGE_NAME: bcgov/sso-loki
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: 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: grafana-config
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}