DEV Community

Discussion on: Deploy a React app to DigitalOcean using Github Actions and Docker

Collapse
 
athmakuri profile image
Susheel Athmakuri • Edited

I am getting name unknown: The expected resource was not found. while publishing to the Github Package Registry.

LOG

Successfully built 831f744bab47
Successfully tagged docker.pkg.github.com/repo_name/image_name:latest
The push refers to repository [docker.pkg.github.com/repo_name/image_name]
d4c3bfb3f5d5: Preparing
3810cc0c140f: Preparing
3e207b409db3: Preparing
** name unknown: The expected resource was not found. **

DEPLOY FILE

name: build

on:
  push:
    branches: 
      - master

jobs:
  build:
    runs-on: ubuntu-latest
    steps:
    - uses: actions/checkout@v1
    - name: Use Node.js 13.10
      uses: actions/setup-node@v1
      with:
        node-version: '13.10'
    - name: Publish to Github Packages Registry
      uses: elgohr/Publish-Docker-Github-Action@master
      with:
        name: github_username/repo_name/image_name
        registry: docker.pkg.github.com
        username: ${{ secrets.USERNAME_GITHUB }}
        password: ${{ secrets.githubTokenSecret }}
        dockerfile: Dockerfile-prod
Enter fullscreen mode Exit fullscreen mode

Not sure what the unknown thing is.

Collapse
 
kenessajr profile image
Remy Muhire

Hi @athmakuri ,

You're not specifying your Github username, repository name, and the Docker image name github_username/repo_name/image_name. For example, my Github username is kenessajr and my repository name and docker image are both called react-with-actions, kenessajr/react-with-actions/react-with-actions. What you have to do is editing and specifying correctly your variables.

Collapse
 
athmakuri profile image
Susheel Athmakuri • Edited

Hi Remy, Thanks for your response. Here is the actual name that I have, susheelv/arc_recipe/recipecreator for which I am getting the error.

Deploy File

    - name: Publish to Github Packages Registry
      uses: elgohr/Publish-Docker-Github-Action@master
      with:
        name: susheelv/ARCRecipes/recipecreator
        registry: docker.pkg.github.com
        username: ${{ secrets.USERNAME_GITHUB }}
        password: ${{ secrets.githubTokenSecret }}
        dockerfile: Dockerfile-prod
        tags: latest

Error

Step 10/10 : CMD ["nginx", "-g", "daemon off;"]
 ---> Running in ec67f6ce496a
Removing intermediate container ec67f6ce496a
 ---> 3c2f28dbd026
Successfully built 3c2f28dbd026
Successfully tagged docker.pkg.github.com/***/arcrecipes/recipecreator:latest
The push refers to repository [docker.pkg.github.com/***/arcrecipes/recipecreator]
91f28809782e: Preparing
3810cc0c140f: Preparing
3e207b409db3: Preparing
name unknown: The expected resource was not found.
Thread Thread
 
athmakuri profile image
Susheel Athmakuri

Nevermind. I had to use the organization's name instead of my personal username to create a package.