Wandalen / wretry.action

Retry action for Github CI
MIT License
98 stars 22 forks source link

Retry Docker Actions #62

Closed coolrazor007 closed 2 years ago

coolrazor007 commented 2 years ago

I'm having trouble getting this docker action to retry properly: docker/build-push-action@v2 Issue #52 mentions that "retry Docker actions" are not yet implemented so you may be aware of this already. From what I can tell the action "docker/login-action@v1" is required to login into the registry before running the build-push-action action (I've used this just fine without wretry.action). However, it seems when I use Wandalen/wretry.action@v1.0.27 the "context" for the referenced action is silo'd from the previously action for logging into the registry.

Works without retry:

- name: Login to Github Registry
  uses: docker/login-action@v1
  with:
    registry: ghcr.io
    username: ${{ github.actor }}
    password: ${{ github.token }}  

- name: Build image and push to GitHub Container Registry
  uses: docker/build-push-action@v2
  with:
    context: ./
    tags: ghcr.io/[github account]/helloworld:latest
    push: true

Does not work with retry:

- name: Login to Github Registry
  uses: docker/login-action@v1
  with:
    registry: ghcr.io
    username: ${{ github.actor }}
    password: ${{ github.token }}  

- name: Retry Test for github GHCR push
  uses: Wandalen/wretry.action@v1.0.27
  with:
    action: docker/build-push-action@v2
    with: |
      context: .
      tags: ghcr.io/[github account]/helloworld:latest
      push: true
    attempt_limit: 3
    attempt_delay: 3000

Errors in Github for the retry action:

error: failed to solve: unexpected status: 403 Forbidden
Error: buildx failed with: error: failed to solve: unexpected status: 403 Forbidden
coolrazor007 commented 2 years ago

Nevermind. Turned out to be permissions issues.