Skip to content

Commit

Permalink
Use full checkout for docker image building
Browse files Browse the repository at this point in the history
We build the docker tag in part from the number of commits on the
current branch. This provides a number value that can only increaase
over time. A useful automated "release" or "version" number. However, it
relies on `git rev-list` which in turn requires _all_ the commits to be
available in order to get an accurate count. The default for github
actions is a shallow fetch. So here we change it to fetch the whole
shebang whem building the Docker image.
  • Loading branch information
a-musing-moose committed Dec 9, 2024
1 parent e2f8f32 commit 752d1b1
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions template/.github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -214,6 +214,10 @@ jobs:
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
# The tag applied to the Docker image we build is based on the number of commits
# on the current branch. This is only accurate when you have a _full_ checkout.
fetch-depth: 0

- name: Install management tools
run: pipx install invoke
Expand Down

0 comments on commit 752d1b1

Please sign in to comment.