Skip to content

Commit b7f1595

Browse files
committed
Set branches for Docker build in the CI.yml
When you're building a docker file of a branch (eg. to test a pull request) then use that branch.
1 parent 9c196db commit b7f1595

2 files changed

Lines changed: 5 additions & 2 deletions

File tree

.github/workflows/CI.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,4 +83,5 @@ jobs:
8383
push: ${{ github.ref == 'refs/heads/main' && github.repository == 'ReactionMechanismGenerator/RMG-Py' }}
8484
tags: reactionmechanismgenerator/rmg:latest
8585
build-args: |
86-
RMS_Branch=for_rmg
86+
RMG_Py_Branch=${{ github.head_ref || github.ref_name }}
87+
RMG_Database_Branch=${{ env.RMG_DATABASE_BRANCH }}

Dockerfile

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,9 @@ ENV PATH="/miniconda/bin:$PATH"
4545
SHELL ["/bin/bash", "-c"]
4646

4747
# Add build arguments for RMG-Py, RMG-database, and RMS branches.
48-
ARG RMG_Py_Branch=docker
48+
# The defaults are set here, but they can be overridden at build time
49+
# using the --build-arg option, or in the continous integration CI.yml file.
50+
ARG RMG_Py_Branch=main
4951
ARG RMG_Database_Branch=main
5052

5153
# cd

0 commit comments

Comments
 (0)