diff --git a/.github/workflows/merge-acm-grafana.yaml b/.github/workflows/merge-acm-grafana.yaml new file mode 100644 index 0000000..0801693 --- /dev/null +++ b/.github/workflows/merge-acm-grafana.yaml @@ -0,0 +1,62 @@ +name: ACM Grafana merger + +on: + workflow_dispatch: + schedule: + - cron: '0 0 * * 1' #@weekly + pull_request: + paths: + - '.github/workflows/merge-acm-flow.yaml' + - '.github/workflows/merge-acm-grafana.yaml' + push: + paths: + - '.github/workflows/merge-acm-flow.yaml' + - '.github/workflows/merge-acm-grafana.yaml' +jobs: + grafana-merge: + uses: ./.github/workflows/merge-acm-flow.yaml + with: + upstream: grafana/grafana + downstream: stolostron/grafana + sandbox: rhobs/acm-grafana + go-version: "1.22" + node-version: "20" + restore-downstream: >- + OWNERS + .github + restore-upstream: >- + .drone.yml + CHANGELOG.md + docs + go.mod + go.sum + go.work + go.work.sum + pkg + lerna.json + package.json + packages + public/app/ + yarn.lock + assets-cmd: | + # generate nodejs files + # Don't use too much heap + export NODE_OPTIONS="--max_old_space_size=4096" + yarn install --immutable + # get rid of old assets + rm -rf ./public/build/ + NODE_ENV=production yarn build + + # Generate go files with wire + go mod download + go run ./pkg/build/wire/cmd/wire/main.go gen -tags oss ./pkg/server + + # Commit assets + git add pkg/server/wire_gen.go ./public/build ./public/app/plugins/datasource/*/dist/* + git diff --cached --exit-code || git commit -s -m "[bot] assets: generate" + secrets: + pr-app-id: ${{ secrets.ACM_APP_ID }} + pr-app-private-key: ${{ secrets.ACM_APP_PRIVATE_KEY }} + cloner-app-id: ${{ secrets.ACM_CLONER_APP_ID }} + cloner-app-private-key: ${{ secrets.ACM_CLONER_APP_PRIVATE_KEY }} + slack-webhook-url: ${{ secrets.ACM_SLACK_WEBHOOK_URL }}