File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ name : Github Release Created
2+
3+ on :
4+ release :
5+ types : ["published"] # Inherits all input defaults
6+
7+ concurrency :
8+ group : ${{ github.workflow }}-${{ github.ref }}
9+ cancel-in-progress : false
10+
11+ jobs :
12+ deploy-main :
13+ name : Package and Publish Terraform Modules to GitHub Releases assets
14+ runs-on : ubuntu-latest
15+
16+ permissions :
17+ id-token : write
18+ contents : read
19+
20+ steps :
21+ - name : Checkout repository
22+ uses : actions/checkout@v5.0.0
23+
24+ - name : " Package and Publish Terraform modules"
25+ run : |
26+ cd infrastructure/modules
27+ for module in */; do
28+ module_name=${module%/}
29+ echo "Zipping contents of $module_name..."
30+ (cd "$module_name" && zip -r "../../../artifacts/terraform-${module_name}.zip" .)
31+ echo "Publishing $module_name module..."
32+ gh release upload ${{ github.event.release.tag_name }} "../../artifacts/terraform-${module_name}.zip" --clobber
33+ done
34+ env :
35+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
You can’t perform that action at this time.
0 commit comments