testing #59
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: Update Releases | |
on: | |
push: | |
# schedule: | |
# - cron: "0 */4 * * *" | |
permissions: | |
contents: write | |
pull-requests: write | |
jobs: | |
update-releases: | |
# if: github.repository == 'tailcallhq/tailcallhq.github.io' && github.ref == 'refs/heads/develop' | |
if: github.repository == 'tailcallhq/tailcallhq.github.io' | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
- name: Set up Node.js | |
uses: actions/setup-node@v3 | |
with: | |
node-version: 20 | |
- name: Run npm Install | |
run: npm install | |
- name: Run Releases Docs Generator Script | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
run: node release-notes-generator.js | |
- name: Check for Existing Pull Request | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
run: | | |
EXISTING_PR=$(gh pr list --state open --base develop --json headRefName --jq '.[] | select(.headRefName | startswith("update-releases")) | .headRefName') | |
echo "existing_pr_branch=$EXISTING_PR" >> $GITHUB_ENV | |
- name: Create Pull Request | |
if: env.existing_pr_branch == '' | |
uses: peter-evans/create-pull-request@v7 | |
with: | |
token: ${{ secrets.GITHUB_TOKEN }} | |
commit-message: "chore: updated releases" | |
branch: update-releases | |
branch-suffix: timestamp | |
base: develop | |
title: "chore: updated releases" | |
body: | | |
This is an auto-generated pull request that updates releases. | |
reviewers: tusharmath | |
maintainer-can-modify: true |