1. Check for Prisma CLI Update #241741
This file contains hidden or 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: 1. Check for Prisma CLI Update | |
on: | |
schedule: | |
- cron: '*/5 * * * *' | |
workflow_dispatch: | |
env: | |
ENVIRONMENT: ${{ secrets.ENVIRONMENT }} | |
PRISMA_TELEMETRY_INFORMATION: 'language-tools 1_check_for_update.yml' | |
jobs: | |
check: | |
name: Check for Prisma CLI update | |
runs-on: ubuntu-latest | |
timeout-minutes: 7 | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
token: ${{ secrets.PRISMA_BOT_TOKEN }} | |
- name: Use Node.js | |
uses: actions/setup-node@v4 | |
with: | |
node-version: '20' | |
cache: 'npm' | |
- name: Install Dependencies | |
run: npm install | |
# First it runs this | |
- name: Check for Prisma CLI update | |
id: check_update | |
run: node scripts/check_for_update.js | |
# ... and depending on the output any (or none) of these 3: | |
- name: Invoke bump workflow with inputs for dev | |
if: ${{ steps.check_update.outputs.dev_version }} | |
uses: benc-uk/workflow-dispatch@v1 | |
with: | |
workflow: 2. Bump versions | |
token: ${{ secrets.PRISMA_BOT_TOKEN }} | |
inputs: '{ "npm_channel": "dev", "version": "${{ steps.check_update.outputs.dev_version }}" }' | |
- name: Invoke bump workflow with inputs for latest | |
if: ${{ steps.check_update.outputs.latest_version }} | |
uses: benc-uk/workflow-dispatch@v1 | |
with: | |
workflow: 2. Bump versions | |
token: ${{ secrets.PRISMA_BOT_TOKEN }} | |
inputs: '{ "npm_channel": "latest", "version": "${{ steps.check_update.outputs.latest_version }}" }' | |
- name: Invoke bump workflow with inputs for patch-dev | |
if: ${{ steps.check_update.outputs.patch-dev_version }} | |
uses: benc-uk/workflow-dispatch@v1 | |
with: | |
workflow: 2. Bump versions | |
token: ${{ secrets.PRISMA_BOT_TOKEN }} | |
inputs: '{ "npm_channel": "patch-dev", "version": "${{ steps.check_update.outputs.patch-dev_version }}" }' |