Question

updating app spec: unable to update app: exit status 1

Hello,

I deployed the apps with Github repository option at first. Now I try to change it to DOCR.

When I try to do it from “doctl” I get "Image tag not found. When I try to do it via Github Action “digitalocean/app_action@main” I get error as Question Title.

I am kind of stuck of this process now. Error messages unfortunately not helpful.

Following lines are my current app-spec, app-spec that I would like to update it via doctl and last one my Github Action file.

I would be glad if you guide me on this. Many thanks

Current App Spec

name: *********
region: fra
services:
- build_command: yarn build
  github:
    branch: dev
    repo: <organization-name>/repo-name>
  http_port: 3001
  instance_count: 1
  instance_size_slug: basic-xs
  name: *********
  routes:
  - path: /backend
  run_command: yarn start
  source_dir: /
- build_command: yarn build
  github:
    branch: dev
    repo: <organization-name>/repo-name>
  http_port: 8080
  instance_count: 1
  instance_size_slug: basic-xxs
  name: *********
  routes:
  - path: /
  run_command: yarn start
  source_dir: /

Doctl Update App Spec

name: *******
region: fra
services:
- name: *******
  environment_slug: node-js
  image:
    registry_type: "DOCR"
    repository: registry.digitalocean.com/<registry-name>/<docker-image-name> 
    tag: "19600b3"
  http_port: 3001
  instance_count: 1
  instance_size_slug: basic-xs 
  routes:
  - path: /backend
- name: *******
  environment_slug: node-js
  github:
    branch: dev
    deploy_on_push: false
    repo: <organization-name>/repo-name>
  http_port: 8080
  instance_count: 1
  instance_size_slug: basic-xxs
  routes:
  - path: /

Github Action that I use

delivery: 
    needs: [buildx]
    runs-on: ubuntu-latest
    steps: 
      -
        name: Generate GITHUB_SHA
        id: github-sha
        shell: bash
        run: |
            SHORT_SHA=$(echo $GITHUB_SHA | cut -c1-7)
            echo "::set-output name=sha::$SHORT_SHA"
      - 
        name: Digital Ocean App Platform Deployment
        uses: digitalocean/app_action@main
        with:
          app_name: <app-name>
          token: ${{ secrets.DO_ACCESS_TOKEN }}
          images: '[{
              "name": "<component-name>",
              "image": {
                "registry_type": "DOCR",
                "repository": "registry.digitalocean.com/<registry-name>/<image-name>",
                "tag": "${{steps.github-sha.outputs.sha}}"
              }
            }]'

Submit an answer

This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

Sign In or Sign Up to Answer

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Want to learn more? Join the DigitalOcean Community!

Join our DigitalOcean community of over a million developers for free! Get help and share knowledge in Q&A, subscribe to topics of interest, and get courses and tools that will help you grow as a developer and scale your project or business.

Hello,

Is that tag that you’ve used 19600b3 the tag of your image or the image ID?

The tag defaults to latest if not provided and usually is the version of your build. The one that you’ve provided looks more like the image ID rather than the tag.

Let me know if this is the case.

Best,

Bobby