Skip to content

Commit d4b541e

Browse files
authored
Upload registry manifest as an Actions artifact (#320)
* Upload registry manifest as an Actions artifact * Update comment
1 parent 9329657 commit d4b541e

File tree

1 file changed

+24
-0
lines changed

1 file changed

+24
-0
lines changed

.github/workflows/build.yml

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,30 @@ jobs:
6565
name: metadata.json
6666
path: ${{ steps.generate-metadata-file.outputs.filepath }}
6767

68+
# This job uploads an Actions artifact named terraform-registry-manifest.json.zip.
69+
# The artifact contains a single file with a filename that Terraform Registry expects
70+
# (example: terraform-provider-cloudinit_2.3.6-alpha1.json) and contents identical
71+
# to the terraform-registry-manifest.json file in the repository.
72+
upload-terraform-registry-manifest-file:
73+
needs: set-product-version
74+
runs-on: ubuntu-latest
75+
outputs:
76+
filepath: ${{ steps.terraform-registry-manifest.outputs.filename }}
77+
steps:
78+
- name: "Checkout directory"
79+
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
80+
with:
81+
path: ${{ env.PKG_NAME }}
82+
- name: Build filename
83+
id: terraform-registry-manifest
84+
run: |
85+
cp ${{ env.PKG_NAME }}/terraform-registry-manifest.json "${{ env.PKG_NAME }}_${{ needs.set-product-version.outputs.product-version }}.json"
86+
echo "filename=${{ env.PKG_NAME }}_${{ needs.set-product-version.outputs.product-version }}.json" >> "$GITHUB_OUTPUT"
87+
- uses: actions/upload-artifact@65c4c4a1ddee5b72f698fdd19549f0f0fb45cf08 # v4.6.0
88+
with:
89+
name: terraform-registry-manifest.json
90+
path: ${{ steps.terraform-registry-manifest.outputs.filename }}
91+
6892
build-other:
6993
needs:
7094
- get-go-version

0 commit comments

Comments
 (0)