Skip to content
This repository has been archived by the owner on Oct 15, 2020. It is now read-only.

[Question] "No images to push" on running action #8

Open
SpencerKaiser opened this issue Oct 17, 2019 · 4 comments
Open

[Question] "No images to push" on running action #8

SpencerKaiser opened this issue Oct 17, 2019 · 4 comments

Comments

@SpencerKaiser
Copy link

Hi all, sorry if this isn't the right place to ask or if I'm doing something obviously wrong, but I just created an action to deploy my TypeScript Nodejs app to Heroku and I've hit a wall.

I'm trying to deploy my project on a push event on the master branch. Before calling the Heroku CLI, I build my app into my dist directory.

When I run the action below, I get this error:

Run actions/heroku@master
/usr/bin/docker run --name e959fba43cacc1550c4b8b85486f7a064e9056_e973d1 --label e959fb --workdir /github/workspace --rm -e HEROKU_API_KEY -e INPUT_ARGS -e HOME -e GITHUB_REF -e GITHUB_SHA -e GITHUB_REPOSITORY -e GITHUB_ACTOR -e GITHUB_WORKFLOW -e GITHUB_HEAD_REF -e GITHUB_BASE_REF -e GITHUB_EVENT_NAME -e GITHUB_WORKSPACE -e GITHUB_ACTION -e GITHUB_EVENT_PATH -e RUNNER_OS -e RUNNER_TOOL_CACHE -e RUNNER_TEMP -e RUNNER_WORKSPACE -e ACTIONS_RUNTIME_URL -e ACTIONS_RUNTIME_TOKEN -e GITHUB_ACTIONS=true -v "/var/run/docker.sock":"/var/run/docker.sock" -v "/home/runner/work/_temp/_github_home":"/github/home" -v "/home/runner/work/_temp/_github_workflow":"/github/workflow" -v "/home/runner/work/Hangar/Hangar":"/github/workspace" e959fb:a43cacc1550c4b8b85486f7a064e9056 container:push -a american-hangar web
 ▸    No images to push
##[error]Docker run failed with exit code 1

I have the heroku/heroku image specified in my package.json, but I feel like I'm missing something really obvious. Do I need my own docker image??

Here's my action:

name: Deploy

on:
  push:
    branches: 
      - master
      # Deploy on hack branches (keeps env clean and prevents data loss on deploy)
      - hack/* 

jobs:
  build:
    runs-on: ubuntu-latest
    strategy:
      matrix:
        node-version: [10.x]
    steps:
    - uses: actions/checkout@v1
    - name: Use Node.js ${{ matrix.node-version }}
      uses: actions/setup-node@v1
      with:
        node-version: ${{ matrix.node-version }}
    - name: npm install and build
      run: |
        npm i
        npm run build
        
  release:
     runs-on: ubuntu-latest
     steps:
     - uses: actions/checkout@master
     - name: login
       uses: actions/heroku@master
       env:
         HEROKU_API_KEY: ${{ secrets.HEROKU_API_KEY }}
       with:
         args: container:login
     - name: push
       uses: actions/heroku@master
       env:
         HEROKU_API_KEY: ${{ secrets.HEROKU_API_KEY }}
       with:
         args: container:push -a american-hangar web
     - name: release
       uses: actions/heroku@master
       env:
         HEROKU_API_KEY: ${{ secrets.HEROKU_API_KEY }}
       with:
         args: container:release -a american-hangar web
@antonioalmeida
Copy link

Got the exact same problem with a virtually identical workflow file

@SpencerKaiser
Copy link
Author

@antonioalmeida we ended up bailing from Actions in favor of a “Deploy to Heroku” button for our use case, but if you need CD, I’d recommend using Webhooks. If you really want to use Actions, we got it 90% of the way there with the Actions in that project I linked to above.

@SpencerKaiser
Copy link
Author

And you absolutely need a Dockerfile in your repo. Feel free to copy what we have there.

@antonioalmeida
Copy link

The project is mainly to learn on how to use Github Actions for typical CI/CD operations. I got it working thanks to your repo, thanks!

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

No branches or pull requests

2 participants