Files
codex-security/.github/workflows/node-release-pr.yml
T
dependabot[bot] 90bd4575dc ci: bump actions/create-github-app-token from 3.2.0 to 3.3.0 (#1744)
Bumps [actions/create-github-app-token](https://github.com/actions/create-github-app-token) from 3.2.0 to 3.3.0.
- [Release notes](https://github.com/actions/create-github-app-token/releases)
- [Changelog](https://github.com/actions/create-github-app-token/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/create-github-app-token/compare/bcd2ba49218906704ab6c1aa796996da409d3eb1...64ab729a6294000f5aa4a4bc0b73d1f32bc45510)

---
updated-dependencies:
- dependency-name: actions/create-github-app-token
  dependency-version: 3.3.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-10-20 05:16:48 +08:00

86 lines
2.5 KiB
YAML

name: node-release-pr
on:
push:
branches: [main]
workflow_dispatch:
inputs:
dry_run:
description: Preview the release PR without changing GitHub
type: boolean
default: true
permissions:
contents: read
pull-requests: read
concurrency:
group: node-release-pr
cancel-in-progress: false
jobs:
preview:
if: >-
github.repository == 'openai/codex-security' && github.ref == 'refs/heads/main' &&
((github.event_name == 'workflow_dispatch' && inputs.dry_run) ||
(github.event_name != 'workflow_dispatch' && vars.RELEASE_PR_ENABLED != 'true'))
name: preview release PR
runs-on: ubuntu-latest
env:
RELEASE_PR_DRY_RUN: "true"
steps:
- &checkout-main-never-the-release-pr
name: Checkout main, never the release PR
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
ref: main
fetch-depth: 0
persist-credentials: false
- &set-up-node-js
name: Set up Node.js
uses: actions/setup-node@949feb2413d6458794dcd2491c4babbbce0c15c1 # v7.1.0
with:
node-version: "22.13.0"
- name: Preview the rolling release proposal
env:
GH_TOKEN: ${{ github.token }}
run: node sdk/typescript/scripts/release-pr.mjs
reconcile:
if: >-
github.repository == 'openai/codex-security' && github.ref == 'refs/heads/main' &&
((github.event_name == 'workflow_dispatch' && !inputs.dry_run) ||
(github.event_name != 'workflow_dispatch' && vars.RELEASE_PR_ENABLED == 'true'))
name: maintain release PR
runs-on: ubuntu-latest
permissions:
contents: write
pull-requests: write
env:
RELEASE_PR_DRY_RUN: "false"
steps:
- *checkout-main-never-the-release-pr
- *set-up-node-js
- name: Create repository-scoped release App token
id: app-token
if: vars.RELEASE_APP_CLIENT_ID != ''
uses: actions/create-github-app-token@64ab729a6294000f5aa4a4bc0b73d1f32bc45510 # v3.3.0
with:
client-id: ${{ vars.RELEASE_APP_CLIENT_ID }}
private-key: ${{ secrets.RELEASE_APP_PRIVATE_KEY }}
owner: ${{ github.repository_owner }}
repositories: ${{ github.event.repository.name }}
permission-contents: write
permission-pull-requests: write
- name: Reconcile the rolling release proposal
env:
GH_TOKEN: ${{ steps.app-token.outputs.token || github.token }}
run: node sdk/typescript/scripts/release-pr.mjs