create action archive cache.
This commit is contained in:
+27
-1
@@ -85,8 +85,34 @@ done
|
||||
popd
|
||||
|
||||
# List the repositories
|
||||
cd $layout_dir
|
||||
pushd "$layout_dir"
|
||||
echo 'Created repos:'
|
||||
for repo in ./*; do
|
||||
echo "$PWD/$repo"
|
||||
done
|
||||
popd
|
||||
|
||||
# Split the layout into zip vs. tar.gz
|
||||
zipball_layout_dir="$script_dir/../_layout_zipball"
|
||||
rm -rf "$zipball_layout_dir"
|
||||
tarball_layout_dir="$script_dir/../_layout_tarball"
|
||||
rm -rf "$tarball_layout_dir"
|
||||
|
||||
cp -r "$layout_dir" "$zipball_layout_dir"
|
||||
pushd "$zipball_layout_dir"
|
||||
find . -type f -name "*.tar.gz" -delete
|
||||
ls -l -R ./
|
||||
echo "Creating action_cache_zipball in ${zipball_layout_dir}"
|
||||
pwsh -NoLogo -NoProfile -NonInteractive -ExecutionPolicy Unrestricted -Command "Compress-Archive -Path \"${zipball_layout_dir}\" -DestinationPath \"${layout_dir}\action_cache.zip\""
|
||||
popd
|
||||
|
||||
cp -r "$layout_dir" "$tarball_layout_dir"
|
||||
pushd "$tarball_layout_dir"
|
||||
find . -type f -name "*.zip" -delete
|
||||
ls -l -R ./
|
||||
echo "Creating action_cache.tar.gz in ${tarball_layout_dir}"
|
||||
pushd "$layout_dir"
|
||||
tar -czf "action_cache.tar.gz" -C "${tarball_layout_dir}" .
|
||||
popd
|
||||
popd
|
||||
|
||||
|
||||
@@ -23,7 +23,7 @@ git push --set-upstream origin "$branch"
|
||||
|
||||
# Open pull request
|
||||
url="https://api.github.com/repos/$GITHUB_REPOSITORY/pulls" # GITHUB_REPOSITORY format is: OWNER/REPO
|
||||
body="{\"title\": \"$branch\", \"body\": \"$branch\", \"head\": \"$branch\", \"base\": \"master\"}"
|
||||
body="{\"title\": \"$branch\", \"body\": \"$branch\", \"head\": \"$branch\", \"base\": \"main\"}"
|
||||
http_code="$(curl --silent --output response.json --write-out '%{http_code}' --header "Authorization: bearer $GITHUB_TOKEN" --request POST --data "$body" "$url")"
|
||||
if [[ "$http_code" != "201" ]]; then
|
||||
echo "Unexpected HTTP CODE '$http_code'"
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
mkdir actions_setup-go
|
||||
pushd actions_setup-go
|
||||
curl -s -S -L -o '883490dfd06f396ebe0b738bc313a53cf9d851e5.tar.gz' 'https://api.github.com/repos/actions/setup-go/tarball/883490dfd06f396ebe0b738bc313a53cf9d851e5'
|
||||
curl -s -S -L -o '883490dfd06f396ebe0b738bc313a53cf9d851e5.zip' 'https://api.github.com/repos/actions/setup-go/zipball/883490dfd06f396ebe0b738bc313a53cf9d851e5'
|
||||
curl -s -S -L -o 'bfd2fb341f32be7281829126376a12a780ca79fc.tar.gz' 'https://api.github.com/repos/actions/setup-go/tarball/bfd2fb341f32be7281829126376a12a780ca79fc'
|
||||
curl -s -S -L -o 'bfd2fb341f32be7281829126376a12a780ca79fc.zip' 'https://api.github.com/repos/actions/setup-go/zipball/bfd2fb341f32be7281829126376a12a780ca79fc'
|
||||
curl -s -S -L -o '77b162d042858409656f087cab0246511e670694.tar.gz' 'https://api.github.com/repos/actions/setup-go/tarball/77b162d042858409656f087cab0246511e670694'
|
||||
curl -s -S -L -o '77b162d042858409656f087cab0246511e670694.zip' 'https://api.github.com/repos/actions/setup-go/zipball/77b162d042858409656f087cab0246511e670694'
|
||||
curl -s -S -L -o '58fca98f91e83c6442c09dc7175251c60ee9877c.tar.gz' 'https://api.github.com/repos/actions/setup-go/tarball/58fca98f91e83c6442c09dc7175251c60ee9877c'
|
||||
|
||||
Reference in New Issue
Block a user