GitHub CI error parsing HTTP 404 response body when pushing the image

邮差的信 提交于 2019-12-24 06:07:10

问题


Coming from this issue

I am using GitHub Actions for Gradle project with this given steps:

name: Java CI

on: [push]

jobs:
  build:

    runs-on: ubuntu-latest

    steps:
      - uses: actions/checkout@v1
      - name: Set up JDK 13
        uses: actions/setup-java@v1
        with:
          java-version: 13

      - run: ./gradlew bootJar

      - name: Login to Github regestry
        run: docker login docker.pkg.github.com -u xxxxx -p xxxxx

      - name: Build the Docker image
        run: docker build . -t docker.pkg.github.com/sulimanlab/realtime-chat/realtimechat-snapshot-0.$GITHUB_REF


      - name: Push the image to github
        run: docker push docker.pkg.github.com/sulimanlab/realtime-chat/realtimechat-snapshot-0.$GITHUB_REF


At the last step I get this error:

The push refers to repository [docker.pkg.github.com/sulimanlab/realtime-chat/realtimechat-snapshot-0.refs/heads/master]

3aad04996f8f: Preparing

77cae8ab23bf: Preparing

error parsing HTTP 404 response body: invalid character 'p' after top-level value: "404 page not found\n"


回答1:


actually I was using the wrong environment variable to tag my images.

I used $GITHUB_REF what I should use $GITHUB_SHA



来源:https://stackoverflow.com/questions/58938410/github-ci-error-parsing-http-404-response-body-when-pushing-the-image

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!