From 15ecf571eab542ecfaea56cbcad5b1160e67f525 Mon Sep 17 00:00:00 2001 From: Islam Shehata Date: Tue, 22 Oct 2024 12:24:56 +0300 Subject: [PATCH] feat(ci): Open PR in app when ingest options updated --- .github/workflows/release-ingest-options.yaml | 36 +++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 .github/workflows/release-ingest-options.yaml diff --git a/.github/workflows/release-ingest-options.yaml b/.github/workflows/release-ingest-options.yaml new file mode 100644 index 00000000..75c5948c --- /dev/null +++ b/.github/workflows/release-ingest-options.yaml @@ -0,0 +1,36 @@ +name: "Ingest Options Release" + +on: + push: +# on: +# push: +# branches: +# - main + +jobs: + create-ingest-options-PR: + name: Create PR for Ingest Options + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-node@v4 + - run: npm install + - run: npm run generate-ingest-options + - uses: actions/github-script@v7 + with: + script: | + const { repo, owner } = context.repo; + const result = await github.rest.pulls.create({ + title: 'Ingest Options updated', + owner: "axiomhq", + repo: "app", + head: '${{ github.ref_name }}', + base: 'main', + body: [ + 'This PR is auto-generated by', + '[actions/github-script](https://github.com/actions/github-script).' + ].join('\n') + }); + github.rest.issues.addLabels({ + labels: ['feature', 'automated pr'] + });