Set fetch-depth to 0 in workflow

Signed-off-by: Miguel A. Cabrera Minagorri <mcabrera@vmware.com>
This commit is contained in:
Miguel A. Cabrera Minagorri 2022-04-12 12:32:47 +02:00
parent 9fccbd7d86
commit 5d9a58e7a1
2 changed files with 2 additions and 1 deletions

View File

@ -18,5 +18,6 @@ jobs:
uses: actions/checkout@v3
with:
token: ${{ secrets.BITNAMI_BOT_SECRET }}
fetch-depth: 0
- name: Fetch
run: ./scripts/fetch-commits.sh ${{ github.event.inputs.shift }}

View File

@ -62,7 +62,7 @@ function findCommitsToSync() {
# Search on the container origin repo the ID for the latest commit we have locally in the container folder
local -r last_synced_commit_id="$(git rev-list "$origin_name"/master --grep="${last_commit_message}")"
local commits_to_sync=""
local max=20 # If we need to sync more than 20 commits there must be something wrong since we run the job on a daily basis
local max=100 # If we need to sync more than 100 commits there must be something wrong since we run the job on a daily basis
for commit in "${commits[@]}"; do
if [[ "$commit" != "$last_synced_commit_id" ]] && [[ "$max" -gt "0" ]]; then
commits_to_sync="${commit} ${commits_to_sync}"