Question

Unable to deploy DOCR with app_action with giithub actions

Hi,

I have issue deploying DOCR on app platform with github actions.

I successfully public image to DOCR and then in next step when I try to deploy that image to ma app platform I got this error:

 "[{ \"name\": \"web\", \"repository\": \"registry.digitalocean.com/gamio/gamio-api\", \"tag\": \"52b4fb8\" } ]" "gamio-api" "***"
all components with following names were not found in your deployed app spec

I followed guiedlines on app action

here is mine github action workflow part that comunicates with digital ocean:

      - 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: Build container image
        run: docker build . -t registry.digitalocean.com/gamio/gamio-api:${{steps.github-sha.outputs.sha}}

      - name: Install doctl
        uses: digitalocean/action-doctl@v2
        with:
          token: ${{ secrets.DIGITALOCEAN_ACCESS_TOKEN }}

      - name: Log in to DigitalOcean Container Registry with short-lived credentials
        run: doctl registry login --expiry-seconds 600

      - name: Publish Image to Digital Ocean Container Registry
        run: docker push registry.digitalocean.com/gamio/gamio-api:${{steps.github-sha.outputs.sha}}

      - name: DigitalOcean App Platform deployment
        uses: digitalocean/app_action@main
        with:
          app_name: gamio-api
          token: ${{ secrets.DIGITALOCEAN_ACCESS_TOKEN }}
          images: '[{
            "name": "web",
            "repository": "registry.digitalocean.com/gamio/gamio-api",
            "tag": "${{steps.github-sha.outputs.sha}}"
            }
            ]'

my app on digital ocean have name gamio-api and also a web component that should be deployed with this action is named gamio-api


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