diff options
author | 2022-06-01 12:11:51 -0700 | |
---|---|---|
committer | 2022-06-01 12:11:51 -0700 | |
commit | 7ac15ad4654e94aaf28b33846b7437c748a84fe3 (patch) | |
tree | 490e68bdecd2877c48cb9c00e68e0ee40595111e | |
parent | Fix commit count part of version being off by 1 (diff) |
CI: fetch git history to fix version script
The last part of the version is the commit count, which relies on the
repo's commit history.
-rw-r--r-- | .github/workflows/build.yaml | 3 | ||||
-rw-r--r-- | .github/workflows/deploy.yaml | 4 |
2 files changed, 6 insertions, 1 deletions
diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index e5791c9..b878113 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -21,6 +21,9 @@ jobs: steps: - name: Checkout code uses: actions/checkout@v2 + with: + # The version script relies on history. Fetch 100 commits to be safe. + fetch-depth: 100 - name: Get version id: version diff --git a/.github/workflows/deploy.yaml b/.github/workflows/deploy.yaml index 9113188..82903f8 100644 --- a/.github/workflows/deploy.yaml +++ b/.github/workflows/deploy.yaml @@ -36,9 +36,11 @@ jobs: username: ${{ github.repository_owner }} password: ${{ secrets.GITHUB_TOKEN }} - # The Dockerfile will be needed. - name: Checkout code uses: actions/checkout@v2 + with: + # The version script relies on history. Fetch 100 commits to be safe. + fetch-depth: 100 # Build the final production image and push it to GHCR. # Tag it with both the short commit SHA and 'latest'. |