1
0
mirror of https://github.com/Unleash/unleash.git synced 2025-02-09 00:18:00 +01:00

feat: set commit hash as static asset version (#3783)

This commit is contained in:
Jaanus Sellin 2023-05-16 11:44:50 +03:00 committed by GitHub
parent 0a3cf646be
commit a7751dfbdd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -31,12 +31,15 @@ jobs:
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
aws-region: ${{ secrets.AWS_DEFAULT_REGION }}
- name: Get the version
id: get_version
run: echo ::set-output name=VERSION::${GITHUB_REF/refs\/tags\//}
- name: Get the commit hash
id: get_commit_hash
run: |
COMMIT_HASH=${{ github.sha }}
echo "Commit hash: $COMMIT_HASH"
echo "::set-output name=COMMIT_HASH::$COMMIT_HASH"
- name: Publish static assets to S3
run: |
aws s3 cp frontend/build s3://getunleash-static/unleash/${{ steps.get_version.outputs.VERSION }} --recursive
aws s3 cp frontend/build s3://getunleash-static/unleash/commits/${{ steps.get_version.outputs.COMMIT_HASH }} --recursive
- name: Trigger sync
uses: actions/github-script@v6
with: