Skip to content

Option to not push if a pull/rebuild hasn't changed anything and a boolean output rebuilt #438

@nitrocode

Description

@nitrocode

I'd like to

  • provide an option to not push if there isn't a rebuild
    • push_if_changed: true or similar ?
  • know if the container had to rebuild, perhaps with an output
    • If it doesn't, then I know that there must have been file changes in the branch commits ignored successfully by the .dockerignore. If the container does not have to rebuild, then I do not have to redeploy the app.

We can detect if a previous build is the same as current build by comparing the Id which doesn't change if the docker build doesn't change.

docker inspect --format {{.Id}} $docker_image_name

Source: https://stackoverflow.com/a/45306984/2965993

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions