Skip to content

Commit

Permalink
script
Browse files Browse the repository at this point in the history
  • Loading branch information
kayman-mk committed Jan 9, 2025
1 parent 30e4f22 commit 7b34c85
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions .github/update_workflows.sh
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,7 @@ ensure_prerequisites_or_exit
ensure_repo_preconditions_or_exit

echo "Fetching the latest version of the workflows"
latest_template_path=$(mktemp -d -t repository-template-XXXXX)
latest_template_path=$(pwd)/$(mktemp -d -t repository-template-XXXXX)
echo $latest_template_path
gh repo clone https://github.com/Hapag-Lloyd/Workflow-Templates.git "$latest_template_path"

Expand Down Expand Up @@ -256,18 +256,18 @@ rm -rf "$latest_template_path"
# Fix the "on" clause in the workflow files, remove all jobs and set a reference to this repository
#

function x() {
x=$(
cd "$latest_template_path" || exit 9
# add a reference to this repository which holds the workflow
commit_sha=$(git rev-parse HEAD)
tag=$(git describe --tags "$(git rev-list --tags --max-count=1)" || true)
echo "$commit_sha" "$tag"
}
)

commit_sha=$(x | awk '{print $1}')
tag=$(x | awk '{print $2}')
commit_sha=$(echo $x | awk '{print $1}')
tag=$(echo $x | awk '{print $2}')

# iterate over each file in the directory
for file in .github/workflows/*.yml
Expand Down

0 comments on commit 7b34c85

Please sign in to comment.