Skip to content

Post action builds an image #1586

Description

@mnacharov

Contributing guidelines

I've found a bug, and:

  • The documentation does not mention anything about my problem
  • There are no open or closed issues that are related to my problem

Description

I have a workflow with concurrency enabled:

concurrency:
  group: push-${{ github.ref }}
  cancel-in-progress: true

The following push cancels the previous workflow. But the "post" from this action starts the build again:

Image

So, the following workflow needs to wait until the "post" action finishes, which could take a really long time.

Expected behaviour

Post should only remove the secrets, not building the image

Actual behaviour

Image starts building in post action, blocking the following builds

Repository URL

No response

Workflow run URL

No response

YAML workflow

name: build
on: [push]
jobs:
  build:
    runs-on: my-arc-runners
    container:
      image: ghcr.io/bitdeps/actions-runner/images/alpine:3.21
    steps:
      - uses: actions/checkout@v7

      - name: Set up Buildx (remote)
        uses: docker/setup-buildx-action@v3
        with:
          driver: remote
          endpoint: tcp://buildkitd:1234

      - name: Login to registry
        uses: docker/login-action@v3
        with:
          registry: ghcr.io
          username: ${{ github.actor }}
          password: ${{ secrets.GITHUB_TOKEN }}

      - name: Build & push
        uses: docker/build-push-action@v6
        with:
          context: .
          push: true
          tags: ghcr.io/${{ github.repository }}:${{ github.sha }}
          cache-from: type=gha
          cache-to: type=gha,mode=max

Workflow logs

No response

BuildKit logs


Additional info

No response

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions