Like Prometheus, but for logs.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 
loki/.github/workflows/operator-release-please.yml

97 lines
3.3 KiB

name: operator-release-please
on:
push:
paths:
- 'operator/**'
branches:
- main
permissions:
contents: read
pull-requests: read
jobs:
releasePlease:
runs-on: ubuntu-latest
permissions:
contents: "read"
id-token: "write"
pull-requests: "write"
outputs:
release_created: ${{ steps.release.outputs.operator--release_created }}
release_name: ${{ steps.release.outputs.operator--tag_name }}
release_major: ${{ steps.release.outputs.operator--major }}
release_minor: ${{ steps.release.outputs.operator--minor }}
release_patch: ${{ steps.release.outputs.operator--patch }}
steps:
- id: "get_github_app_token"
name: Get GitHub App Token
uses: "actions/create-github-app-token@v1"
with:
app-id: "${{ secrets.APP_ID }}"
owner: "${{ github.repository_owner }}"
private-key: "${{ secrets.APP_PRIVATE_KEY }}"
- uses: googleapis/release-please-action@a02a34c4d625f9be7cb89156071d8567266a2445 # v4
id: release
with:
path: operator
config-file: operator/release-please-config.json
token: ${{ steps.get_github_app_token.outputs.token }}
publishImages:
env:
BUILD_TIMEOUT: 60
IMAGE_PREFIX: "grafana"
needs:
- "releasePlease"
runs-on: ubuntu-latest
permissions:
contents: "read"
id-token: "write"
pull-requests: "write"
steps:
- name: "Set up QEMU"
uses: "docker/setup-qemu-action@29109295f81e9208d7d86ff1c6c12d2833863392" # v3
- name: "Set up docker buildx"
uses: "docker/setup-buildx-action@b5ca514318bd6ebac0fb2aedd5d36ec1b5c232a2" # v3
- name: "Login to DockerHub (from vault)"
uses: "grafana/shared-workflows/actions/dockerhub-login@75804962c1ba608148988c1e2dc35fbb0ee21746"
- name: "Build and push"
timeout-minutes: ${{ env.BUILD_TIMEOUT }}
uses: "docker/build-push-action@14487ce63c7a62a4a324b0bfb37086795e31c6c1" # v6
with:
context: "operator"
file: "Dockerfile"
platforms: "linux/amd64,linux/arm64,linux/arm"
push: true
tags: ${{ env.IMAGE_PREFIX }}/loki-operator:${{ needs.releasePlease.outputs.release_major }}.${{ needs.releasePlease.outputs.release_minor }}.${{ needs.releasePlease.outputs.release_patch }}
publishRelease:
needs:
- "releasePlease"
- "publishImages"
runs-on: ubuntu-latest
permissions:
contents: "read"
id-token: "write"
pull-requests: "write"
if: ${{ needs.releasePlease.outputs.release_created }}
steps:
- id: "get_github_app_token"
name: Get GitHub App Token
uses: "actions/create-github-app-token@v1"
with:
app-id: "${{ secrets.APP_ID }}"
owner: "${{ github.repository_owner }}"
private-key: "${{ secrets.APP_PRIVATE_KEY }}"
- name: "pull code to release"
uses: "actions/checkout@v4"
with:
persist-credentials: false
path: "release"
- name: "publish release"
env:
GH_TOKEN: ${{ steps.get_github_app_token.outputs.token }}
RELEASE_NAME: ${{ needs.releasePlease.outputs.release_name }}
working-directory: "release"
run: |
gh release edit "$RELEASE_NAME" --draft=false --latest=false