CCM-11751: Package and publish modules to Github on release cut #6
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: Github Release Created | |
| on: | |
| # release: | |
| # types: ["published"] # Inherits all input defaults | |
| push: | |
| branch: | |
| - feature/CCM-11751_github_release_fix | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: false | |
| jobs: | |
| deploy-main: | |
| name: Package and Publish Terraform Modules to GitHub Releases assets | |
| runs-on: ubuntu-latest | |
| permissions: | |
| id-token: write | |
| contents: write | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v5.0.0 | |
| - name: "Package and Publish Terraform modules" | |
| run: | | |
| ARTIFACTS_DIR="$PWD/../../artifacts" | |
| mkdir -p "$ARTIFACTS_DIR" | |
| cd infrastructure/modules | |
| for module in */; do | |
| ls -al | |
| module_name=${module%/} | |
| echo "Zipping contents of $module_name..." | |
| (cd "$module_name" && zip -r "$ARTIFACTS_DIR/terraform-${module_name}.zip" .) | |
| echo "Publishing $module_name module..." | |
| gh release upload v2.0.20 "$ARTIFACTS_DIR/terraform-${module_name}.zip" --clobber | |
| done | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |