44 lines
1.8 KiB
YAML
44 lines
1.8 KiB
YAML
name: Upload nightly-distributions.html form the Repo to S3
|
|
|
|
on:
|
|
workflow_dispatch:
|
|
push:
|
|
branches:
|
|
- 'main'
|
|
paths:
|
|
- 'eclipse-distribution/common/html/nightly-distributions.html'
|
|
|
|
jobs:
|
|
|
|
upload-nightly-downloads-s3-cache:
|
|
runs-on: macos-latest
|
|
steps:
|
|
- uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9
|
|
with:
|
|
ref: ${{ inputs.ref }}
|
|
sparse-checkout: |
|
|
.github
|
|
eclipse-distribution/common/html
|
|
- 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: Upload nightly-distributions.html
|
|
# run: |
|
|
# echo "Removing old nightly-distributions.html from s3..."
|
|
# aws s3 rm s3://tools-spring-io/snapshot/STS4/nightly-distributions.html
|
|
# echo "Uploading new nightly-distributions.html to s3..."
|
|
# aws s3 cp ./eclipse-distribution/common/html/nightly-distributions.html s3://tools-spring-io/snapshot/STS4/nightly-distributions.html --no-progress
|
|
- name: Invalidate S3 Cloudfront Cache
|
|
env:
|
|
CLOUDFLARE_ZONE_ID: ${{ secrets.CLOUDFLARE_ZONE_ID }}
|
|
CLOUDFLARE_CACHE_TOKEN: ${{ secrets.CLOUDFLARE_CACHE_TOKEN }}
|
|
run: |
|
|
${{ github.workspace }}/.github/scripts/clear-s3-caches-file.sh snapshot/STS4/nightly-distributions.html
|