Skip to content

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

Description

I'm attempting to build an image for deploy from within a devcontainer using devcontainers/ci@v0.3.1900000417 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/configure-aws-credentials@v4.2.1
              ...

            - name: Log in to Amazon ECR
              id: login-ecr
              uses: aws-actions/amazon-ecr-login@v2.0.1
              ...

            - name: Build images
              uses: devcontainers/ci@v0.3.1900000417
              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

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

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