Merge pull request #17 from sacherjj/new-control-for-deb-compression #9
Workflow file for this run
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: publish-casper-sidecar-deb | |
| permissions: | |
| contents: read | |
| id-token: write | |
| on: | |
| push: | |
| tags: | |
| - "v*.*.*" | |
| jobs: | |
| publish_deb: | |
| strategy: | |
| matrix: | |
| include: | |
| - os: ubuntu-22.04 | |
| code_name: jammy | |
| # - os: ubuntu-24.04 | |
| # code_name: noble | |
| runs-on: ${{ matrix.os }} | |
| steps: | |
| - uses: actions/checkout@2541b1294d2704b0964813337f33b291d3f8596b #v3.0.2 | |
| - name: Configure AWS credentials | |
| uses: aws-actions/configure-aws-credentials@v4 | |
| with: | |
| role-to-assume: ${{ secrets.AWS_ACCESS_ROLE_REPO }} | |
| role-session-name: GitHub_to_AWS_via_FederatedOIDC | |
| aws-region: ${{ secrets.AWS_ACCESS_REGION_REPO }} | |
| - name: Install deps | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install -y aptly | |
| aptly config show | |
| - name: Import GPG key | |
| uses: crazy-max/ghaction-import-gpg@c8bb57c57e8df1be8c73ff3d59deab1dbc00e0d1 #v5.1.0 | |
| with: | |
| gpg_private_key: ${{ secrets.APTLY_GPG_KEY }} | |
| passphrase: ${{ secrets.APTLY_GPG_PASS }} | |
| - name: Build deb | |
| run: ./ci/build_deb.sh | |
| - name: Upload binaries to repo | |
| env: | |
| PLUGIN_REPO_NAME: ${{ secrets.AWS_BUCKET_REPO }} | |
| PLUGIN_REGION: ${{ secrets.AWS_ACCESS_REGION_REPO }} | |
| PLUGIN_GPG_KEY: ${{ secrets.APTLY_GPG_KEY }} | |
| PLUGIN_GPG_PASS: ${{ secrets.APTLY_GPG_PASS }} | |
| PLUGIN_ACL: 'private' | |
| PLUGIN_PREFIX: 'releases' | |
| PLUGIN_DEB_PATH: './artifacts' | |
| PLUGIN_OS_CODENAME: ${{ matrix.code_name }} | |
| run: ./ci/publish_deb_to_repo.sh | |
| - name: Invalidate CloudFront cache | |
| run: | | |
| aws cloudfront create-invalidation --distribution-id ${{ secrets.AWS_CLOUDFRONT_REPO }} --paths "/*" |