Skip to content

[sc-109203]: reinstate missing plugin config (#357) #69

[sc-109203]: reinstate missing plugin config (#357)

[sc-109203]: reinstate missing plugin config (#357) #69

name: Update go-fluentbit-config schema
on:
push:
branches: [main]
paths: ["schemas/**"]
workflow_dispatch:
jobs:
update_go_fluentbit_config:
runs-on: ubuntu-latest
permissions:
contents: read
steps:
- name: Checkout to go-fluentbit-config repository.
uses: actions/checkout@v4
with:
repository: chronosphereio/calyptia-go-fluentbit-config
path: go-fluentbit-config
token: ${{ secrets.CI_PAT }}
- name: Checkout to core-images-index repository.
uses: actions/checkout@v4
with:
path: core-images-index
- name: Copy schemas from core-images-index to go-fluentbit-config.
run: |
export OUTPUT_DIR="$PWD/go-fluentbit-config"
core-images-index/scripts/copy-schemas-to-go-fluentbit-config.sh
shell: bash
- name: Create PR on go-fluentbit-config repository.
id: cpr
uses: peter-evans/create-pull-request@v7
with:
token: ${{ secrets.CI_PAT }}
title: "Update schema to latest"
branch: "update-latest-schema"
delete-branch: true
signoff: true
branch-suffix: short-commit-hash
commit-message: "Update schema to latest"
body: |
Update schema after push on index repo.
- Created by ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}
- Auto-generated by create-pull-request: https://github.com/peter-evans/create-pull-request
draft: false
path: |
go-fluentbit-config/
labels: ci,automerge
- name: Check outputs
if: ${{ steps.cpr.outputs.pull-request-number }}
run: |
echo "Pull Request Number - ${{ steps.cpr.outputs.pull-request-number }}"
echo "Pull Request URL - ${{ steps.cpr.outputs.pull-request-url }}"
shell: bash
- name: Enable Pull Request Automerge
if: ${{ steps.cpr.outputs.pull-request-number }}
run: gh pr merge --squash --auto "${{ steps.cpr.outputs.pull-request-number }}"
working-directory: go-fluentbit-config
env:
GH_TOKEN: ${{ secrets.CI_PAT }}