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 #21

Closed
linkurzweg opened this issue Feb 10, 2020 · 2 comments
Assignees
Labels
Type: Question Further information is requested

Comments

@linkurzweg
Copy link

linkurzweg commented Feb 10, 2020

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"}

Is it not possible to use the same commit id in different jobs? Or what is the problem here? I don't really need the commit id in the comment anyway, just the preview url would be fine too.

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

amondnet commented Feb 18, 2020

@linkurzweg
This repository uses two different projects without problems.

  1. static
  2. angular

If you provide more code or information, I can help.

@amondnet amondnet closed this as completed Apr 4, 2020
@linkurzweg
Copy link
Author

linkurzweg commented Apr 24, 2020

@amondnet I had to work on other things and only got back to this now. I still have the same problem :( maybe you can reopen this or tell me what to do?

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

As I wrote before, the first workflow executes just fine, but the second one errors with:

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

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

2 participants