Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
linkurzweg opened this issue May 11, 2020 · 3 comments
Assignees
Labels
Type: Question Further information is requested

Comments

@linkurzweg
Copy link

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!

@amondnet amondnet added the Type: Question Further information is requested label May 11, 2020
@amondnet amondnet self-assigned this May 11, 2020
@amondnet
Copy link
Owner

Hi, @linkurzweg.
Try with github-comment: false.

uses: amondnet/now-deployment@v2
with:
  github-comment: false
  // ..other input

@linkurzweg
Copy link
Author

Hi @amondnet. Thank you, I'll do that :)
I guess there is no way to make this work, so that both actions can comment the commit? That would be great!

@angusryer
Copy link

Very old thread, I know--but it seems this is still an issue. In my context, I'm not deploying multiple projects, but my workflow does deploy code to a staging environment, tests, then deploys to production.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Question Further information is requested
Projects
None yet
Development

No branches or pull requests

3 participants