From c1fcb8a0fc903420203633ffd45afd3642bf3fa8 Mon Sep 17 00:00:00 2001 From: Ryan Richard Date: Mon, 4 Aug 2025 14:15:38 -0700 Subject: [PATCH] more towards update version/docs after release by creating a PR --- pipelines/main/pipeline.yml | 11 +++++++++++ .../shared-tasks/update-version-and-cli-docs/task.sh | 11 +++++++---- 2 files changed, 18 insertions(+), 4 deletions(-) diff --git a/pipelines/main/pipeline.yml b/pipelines/main/pipeline.yml index ba522a525..4935afe3c 100644 --- a/pipelines/main/pipeline.yml +++ b/pipelines/main/pipeline.yml @@ -342,6 +342,16 @@ resources: username: ((ci-bot-username)) password: ((ci-bot-access-token-with-public-repo-write-permission)) + - name: gh-cli-image + type: registry-image + icon: docker + check_every: 10m + source: + repository: ((ci-ghcr-registry))/gh-cli + username: ((ci-ghcr-puller-username)) + password: ((ci-ghcr-puller-token)) + tag: latest + - name: ci-build-image type: registry-image icon: docker @@ -2711,6 +2721,7 @@ jobs: globs: [ pinniped-cli-linux-amd64 ] - get: pinniped-ci - get: pinniped + - get: gh-cli-image - task: update-version-and-cli-docs timeout: 30m file: pinniped-ci/pipelines/shared-tasks/update-version-and-cli-docs/task.yml diff --git a/pipelines/shared-tasks/update-version-and-cli-docs/task.sh b/pipelines/shared-tasks/update-version-and-cli-docs/task.sh index e1ce46c07..7a89c384b 100755 --- a/pipelines/shared-tasks/update-version-and-cli-docs/task.sh +++ b/pipelines/shared-tasks/update-version-and-cli-docs/task.sh @@ -47,6 +47,13 @@ git add "$configdoc" # Print the current status to the log. git status +# Restore the unstaged changes, if any. +echo "Restoring any unstaged changes." +git restore . + +# Print the current status to the log. +git status + # Did we just stage any changes? staged=$(git --no-pager diff --staged) if [[ "$staged" == "" ]]; then @@ -57,8 +64,4 @@ else echo "Found changes for $clidoc or $configdoc:" echo echo "$staged" - echo - # Commit. - echo "Committing changes." - git commit -m "Updated versions in docs for $pinniped_tag release" fi