Skip to content

failed to deploy on github action #19

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

Open
obzva opened this issue Sep 22, 2023 · 1 comment
Open

failed to deploy on github action #19

obzva opened this issue Sep 22, 2023 · 1 comment

Comments

@obzva
Copy link

obzva commented Sep 22, 2023

Summary

I tried to set up a github action to deploy Sanity studio automaitcally but it fails.
It seems like it's about node version, but I am not sure because I am new to github actions and this kinda things.
Can you help me?

What I did

I stored my API token on my sanity studio github repo as a secret.
I added main.yml file in .github/workflows directory.

name: Deploy Sanity
on:
  push:
    branches: [main]
jobs:
  sanity-deploy:
    runs-on: ubuntu-latest
    name: Deploy Sanity
    steps:
      - name: Checkout Code
        uses: actions/checkout@v2
      - name: Install Dependencies
        run: yarn install
      - uses: sanity-io/[email protected]
        env:
          SANITY_AUTH_TOKEN: ${{ secrets.SANITY_AUTH_TOKEN }}
        with:
          args: deploy

What happened

When I push a commit on main branch, github action failes.
Here is the entire log of github action after a set up a job phase.

Build container for action use: '/home/runner/work/_actions/sanity-io/github-action-sanity/v0.1-alpha/Dockerfile'.
  /usr/bin/docker build -t 943[51](https://github.com/obzva/observatory/actions/runs/6276123206/job/17045103623#step:2:51)b:95780fdf9b034a66b36719485aca6d60 -f "/home/runner/work/_actions/sanity-io/github-action-sanity/v0.1-alpha/Dockerfile" "/home/runner/work/_actions/sanity-io/github-action-sanity/v0.1-alpha"
  #0 building with "default" instance using docker driver
  
  #1 [internal] load .dockerignore
  #1 transferring context: 174B done
  #1 DONE 0.0s
  
  #2 [internal] load build definition from Dockerfile
  #2 transferring dockerfile: 632B done
  #2 DONE 0.0s
  
  #3 [auth] library/node:pull token for registry-1.docker.io
  #3 DONE 0.0s
  
  #4 [internal] load metadata for docker.io/library/node:10-slim
  #4 DONE 0.4s
  
  #5 [internal] load build context
  #5 transferring context: 69.12kB done
  #5 DONE 0.0s
  
  #6 [1/4] FROM docker.io/library/node:10-slim@sha256:88932859e3d022d79161b99628c4c2c50e836437455e2d1b1a008d98367b10d6
  #6 resolve docker.io/library/node:10-slim@sha256:88932859e3d022d79161b99628c4c2c50e836437455e2d1b1a008d98367b10d6 done
  #6 sha256:88932859e3d022d79161b99628c4c2c50e836437455e2d1b1a008d98367b10d6 776B / 776B done
  #6 sha256:64c30c91d628d40eb8f772ee1477f78aff820e317e8afbc5160857ee804e4b70 1.37kB / 1.37kB done
  #6 sha256:6fbcbbb5c6032ce4013d4c736ffe54e0764c36fa14315ae54cb51f244e813c52 7.09kB / 7.09kB done
  #6 sha256:62deabe7a6db312ed773ccd640cd7cfbf51c22bf466886345684558f1036e358 17.83MB / 22.53MB 0.2s
  #6 sha256:f698164f6049bead44aeb7590e88d3df323011c20f0cedbff3d86f62e4c9f184 4.17kB / 4.17kB 0.1s done
  #6 sha256:bc29352cb629712e7fbce7227a16b53308b541ef41e19122a04c15646756b176 15.73MB / 21.91MB 0.2s
  #6 sha256:85e84b4c858fae373ccdf48432de781210efb7fd75d9d801be9917577fe6ca09 1.05MB / 2.93MB 0.2s
  #6 sha256:62deabe7a6db312ed773ccd640cd7cfbf51c22bf466886345684558f1036e358 22.53MB / 22.53MB 0.3s done
  #6 sha256:bc29352cb629712e7fbce7227a16b53308b541ef41e19122a04c15646756b176 21.91MB / 21.91MB 0.3s
  #6 sha256:85e84b4c858fae373ccdf48432de781210efb7fd75d9d801be9917577fe6ca09 2.93MB / 2.93MB 0.3s done
  #6 extracting sha256:62deabe7a6db312ed773ccd640cd7cfbf51c22bf466886345684558f1036e358 0.1s
  #6 sha256:bc29352cb629712e7fbce7227a16b53308b541ef41e19122a04c15646756b176 21.91MB / 21.91MB 0.3s done
  #6 sha256:ac72e4359589952a2e38fbe10287d792cbb57f2ec3cd1eb730e9bab685ac9754 295B / 295B 0.4s done
  #6 extracting sha256:62deabe7a6db312ed773ccd640cd7cfbf51c22bf466886345684558f1036e358 1.2s done
  #6 extracting sha256:f698164f6049bead44aeb7590e88d3df323011c20f0cedbff3d86f62e4c9f184 done
  #6 extracting sha256:bc29352cb629712e7fbce7227a16b53308b541ef41e19122a04c15646756b176
  #6 extracting sha256:bc29352cb629712e7fbce7227a16b53308b541ef41e19122a04c15646756b176 1.5s done
  #6 extracting sha256:85e84b4c858fae373ccdf48432de781210efb7fd75d9d801be9917577fe6ca09 0.1s done
  #6 extracting sha256:ac72e4359589952a2e38fbe10287d792cbb57f2ec3cd1eb730e9bab685ac9754 done
  #6 DONE 3.6s
  
  #7 [2/4] COPY LICENSE README.md THIRD_PARTY_NOTICE.md /
  #7 DONE 0.0s
  
  #8 [3/4] RUN yarn global add @sanity/cli
  #8 0.427 yarn global v1.22.5
  #8 0.468 [1/4] Resolving packages...
  #8 1.631 [2/4] Fetching packages...
  #8 5.600 error [email protected]: The engine "node" is incompatible with this module. Expected version ">=14.0.0". Got "10.24.1"
  #8 5.609 error Found incompatible module.
  #8 5.609 info Visit https://yarnpkg.com/en/docs/cli/global for documentation about this command.
  #8 ERROR: process "/bin/sh -c yarn global add @sanity/cli" did not complete successfully: exit code: 1
  ------
   > [3/4] RUN yarn global add @sanity/cli:
  0.427 yarn global v1.22.5
  0.468 [1/4] Resolving packages...
  1.631 [2/4] Fetching packages...
  5.600 error [email protected]: The engine "node" is incompatible with this module. Expected version ">=14.0.0". Got "10.24.1"
  5.609 error Found incompatible module.
  5.609 info Visit https://yarnpkg.com/en/docs/cli/global for documentation about this command.
  ------
  Dockerfile:14
  --------------------
    12 |     COPY LICENSE README.md THIRD_PARTY_NOTICE.md /
    13 |     
    14 | >>> RUN yarn global add @sanity/cli
    15 |     
    16 |     COPY entrypoint.sh /entrypoint.sh
  --------------------
  ERROR: failed to solve: process "/bin/sh -c yarn global add @sanity/cli" did not complete successfully: exit code: 1
  Warning: Docker build failed with exit code 1, back off 5.007 seconds before retry.
  /usr/bin/docker build -t 94351b:95780fdf9b034a66b36719485aca6d60 -f "/home/runner/work/_actions/sanity-io/github-action-sanity/v0.1-alpha/Dockerfile" "/home/runner/work/_actions/sanity-io/github-action-sanity/v0.1-alpha"
  #0 building with "default" instance using docker driver
  
  #1 [internal] load .dockerignore
  #1 transferring context: 174B done
  #1 DONE 0.0s
  
  #2 [internal] load build definition from Dockerfile
  #2 transferring dockerfile: 632B done
  #2 DONE 0.0s
  
  #3 [internal] load metadata for docker.io/library/node:10-slim
  #3 DONE 0.1s
  
  #4 [1/4] FROM docker.io/library/node:10-slim@sha256:88932859e3d022d79161b99628c4c2c50e836437455e2d1b1a008d98367b10d6
  #4 DONE 0.0s
  
  #5 [internal] load build context
  #5 transferring context: 132B done
  #5 DONE 0.0s
  
  #6 [2/4] COPY LICENSE README.md THIRD_PARTY_NOTICE.md /
  #6 CACHED
  
  #7 [3/4] RUN yarn global add @sanity/cli
  #7 0.394 yarn global v1.22.5
  #7 0.437 [1/4] Resolving packages...
  #7 1.330 [2/4] Fetching packages...
  #7 5.044 error [email protected]: The engine "node" is incompatible with this module. Expected version ">=12". Got "10.24.1"
  #7 5.0[53](https://github.com/obzva/observatory/actions/runs/6276123206/job/17045103623#step:2:53) error Found incompatible module.
  #7 5.053 info Visit https://yarnpkg.com/en/docs/cli/global for documentation about this command.
  #7 ERROR: process "/bin/sh -c yarn global add @sanity/cli" did not complete successfully: exit code: 1
  ------
   > [3/4] RUN yarn global add @sanity/cli:
  0.394 yarn global v1.22.5
  0.437 [1/4] Resolving packages...
  1.330 [2/4] Fetching packages...
  5.044 error [email protected]: The engine "node" is incompatible with this module. Expected version ">=12". Got "10.24.1"
  5.053 error Found incompatible module.
  5.053 info Visit https://yarnpkg.com/en/docs/cli/global for documentation about this command.
  ------
  Dockerfile:14
  --------------------
    12 |     COPY LICENSE README.md THIRD_PARTY_NOTICE.md /
    13 |     
    14 | >>> RUN yarn global add @sanity/cli
    15 |     
    16 |     COPY entrypoint.sh /entrypoint.sh
  --------------------
  ERROR: failed to solve: process "/bin/sh -c yarn global add @sanity/cli" did not complete successfully: exit code: 1
  Warning: Docker build failed with exit code 1, back off 1.369 seconds before retry.
  /usr/bin/docker build -t 94351b:95780fdf9b034a66b36719485aca6d60 -f "/home/runner/work/_actions/sanity-io/github-action-sanity/v0.1-alpha/Dockerfile" "/home/runner/work/_actions/sanity-io/github-action-sanity/v0.1-alpha"
  #0 building with "default" instance using docker driver
  
  #1 [internal] load .dockerignore
  #1 transferring context: 174B done
  #1 DONE 0.0s
  
  #2 [internal] load build definition from Dockerfile
  #2 transferring dockerfile: 632B done
  #2 DONE 0.0s
  
  #3 [internal] load metadata for docker.io/library/node:10-slim
  #3 DONE 0.1s
  
  #4 [1/4] FROM docker.io/library/node:10-slim@sha256:88932859e3d022d79161b99628c4c2c50e8364374[55](https://github.com/obzva/observatory/actions/runs/6276123206/job/17045103623#step:2:55)e2d1b1a008d983[67](https://github.com/obzva/observatory/actions/runs/6276123206/job/17045103623#step:2:67)b10d6
  #4 DONE 0.0s
  
  #5 [internal] load build context
  #5 transferring context: 132B done
  #5 DONE 0.0s
  
  #6 [2/4] COPY LICENSE README.md THIRD_PARTY_NOTICE.md /
  #6 CACHED
  
  #7 [3/4] RUN yarn global add @sanity/cli
  #7 0.388 yarn global v1.22.5
  #7 0.429 [1/4] Resolving packages...
  #7 1.351 [2/4] Fetching packages...
  #7 5.0[82](https://github.com/obzva/observatory/actions/runs/6276123206/job/17045103623#step:2:82) error [email protected]: The engine "node" is incompatible with this module. Expected version ">=14.0.0". Got "10.24.1"
  #7 5.091 error Found incompatible module.
  #7 5.092 info Visit https://yarnpkg.com/en/docs/cli/global for documentation about this command.
  #7 ERROR: process "/bin/sh -c yarn global add @sanity/cli" did not complete successfully: exit code: 1
  ------
   > [3/4] RUN yarn global add @sanity/cli:
  0.3[88](https://github.com/obzva/observatory/actions/runs/6276123206/job/17045103623#step:2:88) yarn global v1.22.5
  0.429 [1/4] Resolving packages...
  1.351 [2/4] Fetching packages...
  5.082 error [email protected]: The engine "node" is incompatible with this module. Expected version ">=14.0.0". Got "10.24.1"
  5.0[91](https://github.com/obzva/observatory/actions/runs/6276123206/job/17045103623#step:2:91) error Found incompatible module.
  5.0[92](https://github.com/obzva/observatory/actions/runs/6276123206/job/17045103623#step:2:92) info Visit https://yarnpkg.com/en/docs/cli/global for documentation about this command.
  ------
  Dockerfile:14
  --------------------
    12 |     COPY LICENSE README.md THIRD_PARTY_NOTICE.md /
    13 |     
    14 | >>> RUN yarn global add @sanity/cli
    15 |     
    16 |     COPY entrypoint.sh /entrypoint.sh
  --------------------
  ERROR: failed to solve: process "/bin/sh -c yarn global add @sanity/cli" did not complete successfully: exit code: 1
Error: Docker build failed with exit code 1
@eivindml
Copy link
Contributor

eivindml commented Nov 13, 2023

Same error for me. Fixed by updating sanity-io/github-action-sanity to latest.

uses: sanity-io/[email protected]

Created a pull request with updated readme: #20

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants