Files
spring-tools/.github/workflows/aggregate-ls-extensions-update-site.yml

46 lines
2.2 KiB
YAML

name: Aggregate LS Extensions Update Sites
on:
workflow_call:
inputs:
version:
description: The suffix of the p2 repo URL in S3 (i.e. 2023-08-01)
required: true
type: string
jobs:
update-aggregate-update-sites:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9
with:
sparse-checkout: |
.github
- name: Timestamp
id: timestamp
run: echo "date=`echo $(($(date +%s%N) / 1000000))`" >> $GITHUB_OUTPUT
- name: Cloudgate S3 Configuration
uses: aws-actions/configure-aws-credentials@010d0da01d0b5a38af31e9c3470dbfdabdecca3a
with:
aws-access-key-id: ${{ secrets.TOOLS_CLOUDGATE_ACCESS_KEY }}
aws-secret-access-key: ${{ secrets.TOOLS_CLOUDGATE_SECRET_KEY }}
role-to-assume: arn:aws:iam::${{ secrets.TOOLS_CLOUDGATE_ACCOUNT_ID }}:role/${{ secrets.TOOLS_CLOUDGATE_USER }}
role-session-name: ${{ github.run_id }}
aws-region: us-east-1
role-duration-seconds: 900
role-skip-session-tagging: true
- name: Generate and Upload Aggregate Update Sites Data
env:
CLOUDFLARE_ZONE_ID: ${{ secrets.CLOUDFLARE_ZONE_ID }}
CLOUDFLARE_CACHE_TOKEN: ${{ secrets.CLOUDFLARE_CACHE_TOKEN }}
run: |
site_url="https://download.springsource.com/release/TOOLS/sts4-language-server-integrations/${{ inputs.version }}"
${{ github.workspace }}/.github/scripts/generate-composite-site-files.sh ${{ steps.timestamp.outputs.date }} $site_url
cat ./compositeArtifacts.xml
cat ./compositeContent.xml
aws s3 cp ./compositeArtifacts.xml s3://dist.springsource.com/release/TOOLS/sts4-language-server-integrations/ --acl public-read
aws s3 cp ./compositeContent.xml s3://dist.springsource.com/release/TOOLS/sts4-language-server-integrations/ --acl public-read
aws s3 cp ./p2.index s3://dist.springsource.com/release/TOOLS/sts4-language-server-integrations/ --acl public-read
${{ github.workspace }}/.github/scripts/clear-s3-caches.sh release/TOOLS/sts4-language-server-integrations