GHA: try generating nightly download page
This commit is contained in:
2
.github/workflows/gen-nighly-downloads.yml
vendored
2
.github/workflows/gen-nighly-downloads.yml
vendored
@@ -23,9 +23,7 @@ jobs:
|
||||
do
|
||||
if [[ "$file" =~ ^"s3://dist." ]]; then
|
||||
download_url=https://download${file:9}
|
||||
echo "s3 url length: ${#s3_url}"
|
||||
filename=${file:${#s3_url}+1}
|
||||
echo "file name: ${filename}"
|
||||
echo ' <li><a href="'${download_url}'">'${filename}'</li>' >> $downloads_html
|
||||
fi
|
||||
done
|
||||
|
||||
@@ -224,3 +224,30 @@ jobs:
|
||||
AWS_DEFAULT_REGION: us-east-1
|
||||
run: |
|
||||
aws s3 rm s3://dist.springsource.com/sts4-distro-ci-temp --recursive --exclude "*" --include "${{ github.run_id }}/*"
|
||||
- uses: actions/download-artifact@cbed621e49e4c01b044d60f6c80ea4ed6328b281
|
||||
with:
|
||||
name: s3-dist-path-${{ github.run_id }}.${{ github.run_attempt }}
|
||||
- name: Update Nightly Distro Downloads page
|
||||
env:
|
||||
AWS_ACCESS_KEY_ID: ${{ secrets.TOOLS_S3_ACCESS_KEY }}
|
||||
AWS_SECRET_ACCESS_KEY: ${{ secrets.TOOLS_S3_SECRET_KEY }}
|
||||
AWS_DEFAULT_REGION: us-east-1
|
||||
run: |
|
||||
dist_path=`cat s3-dist-path.txt`
|
||||
s3_url=s3://dist.springsource.com/${dist_path}
|
||||
eclipse_profile=${{ inputs.eclipse_profile }}
|
||||
eclipse_version=${eclipse_profile:0:2}.${eclipse_profile:2}
|
||||
downloads_html="sts4-nightly-${eclipse_version}.html"
|
||||
files=`aws s3 cp ${s3_url} . --recursive --exclude "*" --include "spring-tool-suite-4*.zip" --include "spring-tool-suite-4*.dmg" --include "spring-tool-suite-4*.self-extracting.jar" --include "spring-tool-suite-4*.tar.gz" --exclude "*/*" --dryrun`
|
||||
echo '<ul>' >> $downloads_html
|
||||
for file in $files
|
||||
do
|
||||
if [[ "$file" =~ ^"s3://dist." ]]; then
|
||||
download_url=https://download${file:9}
|
||||
filename=${file:${#s3_url}+1}
|
||||
echo ' <li><a href="'${download_url}'">'${filename}'</li>' >> $downloads_html
|
||||
fi
|
||||
done
|
||||
echo '</ul>' >> $downloads_html
|
||||
cat ./$downloads_html
|
||||
aws s3 mv ./$downloads_html s3://dist.springsource.com/snapshot/STS4 --acl public-read --no-progress
|
||||
|
||||
@@ -4,12 +4,12 @@ concurrency:
|
||||
group: eclipse-ls-extension-snapshot
|
||||
cancel-in-progress: true
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
#on:
|
||||
# push:
|
||||
# branches:
|
||||
# - 'main'
|
||||
# workflow_dispatch:
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- 'main'
|
||||
|
||||
jobs:
|
||||
eclipse-ls-extensions:
|
||||
|
||||
Reference in New Issue
Block a user