Skip to content

Validation failed: commit_id has been locked when deploying multiple projects #48

@linkurzweg

Description

@linkurzweg

First of all, sorry for opening a new ticket with this issue, but the problem persists and I'm not able to reopen my old issue.

I use the action two deploy two different projects to now from the same repository. The first job runs fine, but the second one errors when trying to comment the commit:

{"resource":"CommitComment","code":"custom","field":"commit_id","message":"commit_id has been locked"}

I used practically the same code for my actions like they are in your examples.
I have a Next.js app and a Storybook app that are separate projects on now.sh. Both live in the same repo.

Here are both my workflow files:

nextjs.yml:

name: Deploy Next.js

on:
  push:
    branches:
      - master
  pull_request:
    branches:
      - master

jobs:
  nextjs:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v2
   
      - uses: amondnet/now-deployment@v2
        id: now-deployment-staging
        if: github.event_name == 'pull_request'
        with:
          github-token: ${{ secrets.GITHUB_TOKEN }}
          zeit-token: ${{ secrets.NOW_TOKEN }}
          now-org-id: ${{ secrets.NOW_TEAM_ID }}
          now-project-id: ${{ secrets.NOW_NEXTJS_PROJECT_ID }}
         
      - uses: amondnet/now-deployment@v2
        id: now-deployment-production
        if: github.event_name == 'push'
        with:
          github-token: ${{ secrets.GITHUB_TOKEN }}
          zeit-token: ${{ secrets.NOW_TOKEN }}
          now-org-id: ${{ secrets.NOW_TEAM_ID }}
          now-project-id: ${{ secrets.NOW_NEXTJS_PROJECT_ID }}
          now-args: '--prod'

storybook.yml:

name: Deploy Storybook

on:
  push:
    branches:
      - master
  pull_request:
    branches:
      - master

jobs:
  storybook:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v2
      - uses: actions/setup-node@v1
        with:
          node-version: '14.x'
          
      - run: yarn install
      - run: yarn run build-storybook

      - uses: amondnet/now-deployment@v2
        id: now-deployment-staging
        if: github.event_name == 'pull_request'
        with:
          github-token: ${{ secrets.GITHUB_TOKEN }}
          zeit-token: ${{ secrets.NOW_TOKEN }}
          now-org-id: ${{ secrets.NOW_TEAM_ID }}
          now-project-id: ${{ secrets.NOW_STORYBOOK_PROJECT_ID }}
          working-directory: storybook-static
         
      - uses: amondnet/now-deployment@v2
        id: now-deployment-production
        if: github.event_name == 'push'
        with:
          github-token: ${{ secrets.GITHUB_TOKEN }}
          zeit-token: ${{ secrets.NOW_TOKEN }}
          now-org-id: ${{ secrets.NOW_TEAM_ID }}
          now-project-id: ${{ secrets.NOW_STORYBOOK_PROJECT_ID }}
          now-args: '--prod'
          working-directory: storybook-static

Could you look into this again? Thanks a lot!

Metadata

Metadata

Assignees

Labels

Type: QuestionFurther information is requested

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions