From 5cf8a0c201b9e225bd94ffdf792ccfb042d70458 Mon Sep 17 00:00:00 2001 From: Ankur Srivastava Date: Wed, 8 May 2024 08:39:25 +0200 Subject: [PATCH] ci: initiate enterprise build (#3424) For each incoming PR, build the enterprise container too. --- .../workflows/dispatch-event-enterprise.yml | 32 +++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 .github/workflows/dispatch-event-enterprise.yml diff --git a/.github/workflows/dispatch-event-enterprise.yml b/.github/workflows/dispatch-event-enterprise.yml new file mode 100644 index 0000000000..185d22d0ff --- /dev/null +++ b/.github/workflows/dispatch-event-enterprise.yml @@ -0,0 +1,32 @@ +name: initiate_enterprise_build + +on: + pull_request: + branches: + - "*" + +jobs: + initiate_enterprise_build: + if: ${{ github.event.pull_request.head.repo.fork == false }} # Only run for PRs which are not from forks + runs-on: ubuntu-latest + permissions: + pull-requests: write + steps: + - name: Generate token + id: generate_token + uses: actions/create-github-app-token@v1 + with: + private-key: ${{ secrets.PRIVATE_KEY }} + app-id: ${{ secrets.APP_ID }} + # Set the owner, so the token can be used in all repositories + owner: ${{ github.repository_owner }} + - name: Repository Dispatch + uses: peter-evans/repository-dispatch@v3 + env: + TOKEN: ${{ steps.generate_token.outputs.token }} + BRANCH_NAME: ${{ github.head_ref || github.ref_name }} + with: + token: ${{ env.TOKEN }} # GitHub App installation access token + repository: openobserve/o2-enterprise + event-type: initiate-enterprise-build + client-payload: '{"o2_enterprise_repo": "main", "o2_opensource_repo": "${{ env.BRANCH_NAME }}"}' \ No newline at end of file