drone-docker icon indicating copy to clipboard operation
drone-docker copied to clipboard

Why does the plugin skip builds for PRs?

Open Dan6erbond opened this issue 2 years ago • 0 comments

Hey, I want to use this plugin to build my Next.js site both when pushed to main and a pull request is opened. But when using the trigger for pull_request I see this output in the logs:

time="2023-09-24T15:42:22Z" level=info msg="skipping automated docker build for refs/pull/80/head"

My pipeline configuration is as follows:

kind: pipeline
type: kubernetes
name: build docker image on pr

steps:
  - name: build image
    image: plugins/docker
    environment:
      NEXT_PUBLIC_CMS_URL: <redacted>
    settings:
      repo: <redacted>
      registry: <redacted>
      username:
        from_secret: docker_username
      password:
        from_secret: docker_password
      build_args_from_env:
        - <redacted>
      auto_tag: true

trigger:
  event:
    - pull_request

Does this plugin do this because of auto_tag: true? Is there a way to include the PR name in the tag maybe to solve that?

Dan6erbond avatar Sep 24 '23 15:09 Dan6erbond