File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -15,21 +15,23 @@ jobs:
1515
1616 permissions :
1717 id-token : write
18- contents : read
18+ contents : write
1919
2020 steps :
2121 - name : Checkout repository
2222 uses : actions/checkout@v5.0.0
2323
2424 - name : " Package and Publish Terraform modules"
2525 run : |
26+ ARTIFACTS_DIR="$PWD/../../artifacts"
27+ mkdir -p "$ARTIFACTS_DIR"
2628 cd infrastructure/modules
2729 for module in */; do
2830 module_name=${module%/}
2931 echo "Zipping contents of $module_name..."
30- (cd "$module_name" && zip -r "../../../artifacts /terraform-${module_name}.zip" .)
32+ (cd "$module_name" && zip -r "$ARTIFACTS_DIR /terraform-${module_name}.zip" .)
3133 echo "Publishing $module_name module..."
32- gh release upload ${{ github.event.release.tag_name }} "../../artifacts /terraform-${module_name}.zip" --clobber
34+ gh release upload ${{ github.event.release.tag_name }} "$ARTIFACTS_DIR /terraform-${module_name}.zip" --clobber
3335 done
3436 env :
3537 GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
You can’t perform that action at this time.
0 commit comments