Skip to content

Commit d719073

Browse files
committed
CCM-11751: Package and publish modules to Github
1 parent f709d06 commit d719073

1 file changed

Lines changed: 19 additions & 5 deletions

File tree

.github/workflows/stage-5-publish.yaml

Lines changed: 19 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -91,11 +91,25 @@ jobs:
9191
env:
9292
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
9393
- name: "Upload Terraform module artifacts"
94-
uses: actions/upload-artifact@v4
95-
with:
96-
name: terraform-modules-${{ inputs.version }}
97-
path: ./artifacts/terraform-*.zip
98-
overwrite: true
94+
shell: bash
95+
run: |
96+
for file in ./artifacts/terraform-*.zip; do
97+
artifact_name=$(basename "$file" .zip)
98+
echo "Uploading $file as artifact $artifact_name"
99+
gh api \
100+
-X POST \
101+
-H "Accept: application/vnd.github+json" \
102+
/repos/${{ github.repository }}/actions/artifacts \
103+
-F name="$artifact_name" \
104+
-F file=@"$file"
105+
done
106+
env:
107+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
108+
# uses: actions/upload-artifact@v4
109+
# with:
110+
# name: terraform-modules-${{ inputs.version }}
111+
# path: ./artifacts/terraform-*.zip
112+
# overwrite: true
99113
success:
100114
name: "Success notification"
101115
runs-on: ubuntu-latest

0 commit comments

Comments
 (0)