feat(ci): Open PR in app when ingest options updated #4
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: "Create Ingest Options PR" | |
on: | |
push: | |
# on: | |
# push: | |
# branches: | |
# - main | |
jobs: | |
release-ingest-options: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: actions/setup-node@v2 | |
- run: npm install | |
- run: npm run generate-ingest-options | |
- uses: actions/github-script | |
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'] | |
}); |