Skip to content

Workflow releasing docker container does not build master branch #195

@BenjaminRodenberg

Description

@BenjaminRodenberg

- name: Build and push Dockerfile
uses: docker/build-push-action@v2
with:
push: true
file: "./tools/releasing/packaging/docker/Dockerfile"
tags: ${{ env.docker_username }}/python-bindings:${{ env.TAG }}
build-args: |
PRECICE_TAG=${{ env.PRECICE_TAG }}
PYTHON_BINDINGS_REF=${{ env.BINDINGS_REF }}

The code above does not provide the correct branch to the dockerfile, if running from master, i.e. a release. This results in an incorrect release.

If I run the following locally, everything works:

python-bindings/tools/releasing/packaging/docker$ docker build -t precice/python-bindings:latest --build-arg branch=v3.0.0.0 .

Note: --build-arg=v3.0.0.0 is needed and not --build-arg=master, because master contains 536d385

One can check for the correct version of the bindings being packaged by

docker run -ti precice/python-bindings:latest
python3 -c "import precice; print(precice.__version__)"

At the current state this breaks our automated packaging pipeline and requires manually releasing the docker container.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions