Skip to content

Docker push fails with "no basic auth credentials" from runCmd #400

@elefantepequeno

Description

@elefantepequeno

I'm attempting to build an image for deploy from within a devcontainer using devcontainers/[email protected] in GitHub Actions. Devcontainer image itself is built and pushed with no problems (previous step performs docker login), but my docker push command from runCmd fails with no basic auth credentials.

My workflow looks something like this:

...
jobs:
    deploy:
        ...
        steps:
            - name: Checkout Repository
              uses: actions/checkout@v4
              ...

            - name: Configure AWS Credentials
              uses: aws-actions/[email protected]
              ...

            - name: Log in to Amazon ECR
              id: login-ecr
              uses: aws-actions/[email protected]
              ...

            - name: Build images
              uses: devcontainers/[email protected]
              env:
                  ECR_REGISTRY: ${{ steps.login-ecr.outputs.registry }}
              with:
                  imageName: ${{ env.ECR_REGISTRY }}/...  # <- this one is fine
                  cacheFrom: ${{ env.ECR_REGISTRY }}/...
                  push: always
                  runCmd: docker build --push ...  # <- this one is broken

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions