Skip to content

Action doesn't perform git checkout #528

@BeyondEvil

Description

@BeyondEvil

Behaviour

Expected behaviour

According to README:

By default, this action uses the Git context so you don't need to use the actions/checkout action to checkout the repository because this will be done directly by buildkit.

Actual behaviour

Checkout doesn't happen.

Configuration

This

      - name: Build and push container
        uses: docker/build-push-action@v2
        with:
          context: ./app
          push: true
          tags: ${{ env.ECR_REGISTRY }}/proxyco/madmax-api:stable

fails with error:

/usr/local/bin/docker buildx build --tag ***.dkr.ecr.us-west-2.amazonaws.com/proxyco/madmax-api:stable --iidfile /tmp/docker-build-push-s6cfCu/iidfile --metadata-file /tmp/docker-build-push-s6cfCu/metadata-file --push ./app
error: unable to prepare context: path "./app" not found
Error: buildx failed with: error: unable to prepare context: path "./app" not found

I have to explicitly do a checkout first, for the build to be successful.

      - uses: actions/checkout@v2

      - name: Build and push container
        uses: docker/build-push-action@v2
        with:
          context: ./app
          push: true
          tags: ${{ env.ECR_REGISTRY }}/proxyco/madmax-api:stable

It's a private repo.

This is run on a self-hosted runner using ubuntu-latest.

What am I doing wrong?

Metadata

Metadata

Assignees

No one assigned

    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