Skip to content

602 fix dashboard and silence urls #496

602 fix dashboard and silence urls

602 fix dashboard and silence urls #496

Workflow file for this run

name: 'Feature'
on:
pull_request:
types: [ labeled, opened, reopened, synchronize ]
env:
REGISTRY: ghcr.io
IMAGE_NAME: ${{ github.repository }}
REPO_NAME: ${{ github.event.repository.name }}
PROMTOOL_IMAGE_NAME: sre-promtool
PROMTOOL_VERSION: 2.38.0
USER: ho-cto
jobs:
code-quality:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/[email protected]
- name: Hadolint Dockerfile
uses: hadolint/[email protected]
with:
dockerfile: ./monitoring-as-code/Dockerfile
- name: Jsonnet format check
run: sh ${{ github.workspace }}/monitoring-as-code/fmt.sh && git diff --exit-code --color
- name: Jsonnet lint check
run: sh ${{ github.workspace }}/monitoring-as-code/lint.sh
container-image:
uses: ./.github/workflows/build-container-image.yml
with:
imageRegistry: ghcr.io
imageName: ${{ github.repository }}
imageBuildContext: ./monitoring-as-code
repositoryName: ${{ github.event.repository.name }}
promtoolImageName: sre-promtool
promtoolVersion: 2.38.0
user: ho-cto
tag: ${{ github.sha }}
secrets: inherit
container-image-push:
needs: container-image
permissions:
packages: write
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/[email protected]
- name: Download artifact
uses: actions/[email protected]
with:
name: ${{ env.REPO_NAME }}
path: /tmp
- name: Load Docker image
run: |
docker load --input /tmp/${{ env.REPO_NAME }}.tar
echo "IMAGE_TAG=$(docker image ls --format '{{.Repository}}:{{.Tag}}' | grep sre-monitoring-as-code)" >> $GITHUB_ENV
- name: Login to GitHub Container Registry
uses: docker/[email protected]
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Push image to GitHub Container Registry
run: docker push ${{ env.IMAGE_TAG }}