Merge pull request #19 from sacherjj/change-compression-in-command #10
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| --- | |
| name: push-artifacts | |
| permissions: | |
| contents: read | |
| id-token: write | |
| on: | |
| push: | |
| branches: | |
| - main | |
| - dev | |
| jobs: | |
| push_artifacts: | |
| strategy: | |
| matrix: | |
| include: | |
| - os: ubuntu-24.04 | |
| code_name: noble | |
| runs-on: ${{ matrix.os }} | |
| steps: | |
| - uses: actions/checkout@2541b1294d2704b0964813337f33b291d3f8596b #v3.0.2 | |
| # Assign AWS PROD role to get access to production cloudfronts and S3 buckets | |
| - name: Configure AWS credentials | |
| uses: aws-actions/configure-aws-credentials@v4 | |
| with: | |
| role-to-assume: ${{ secrets.AWS_ACCESS_ROLE_GENESIS }} | |
| role-session-name: GitHub_to_AWS_via_FederatedOIDC | |
| aws-region: ${{ secrets.AWS_ACCESS_REGION_GENESIS }} | |
| - name: Build artifacts | |
| run: ./ci/build_artifacts_for_upload.sh | |
| - name: Upload artifacts to S3 | |
| run: aws s3 sync ./artifacts/ s3://${{ secrets.AWS_BUCKET_GENESIS }}/artifacts/casper-node-util/$(git rev-parse HEAD)/ | |
| # Required in case of overwrite | |
| - name: Invalidate CloudFront cache | |
| run: aws cloudfront create-invalidation --distribution-id ${{ secrets.AWS_CLOUDFRONT_GENESIS }} --paths "/artifacts/casper-node-util/$(git rev-parse HEAD)/*" | |