Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 22 additions & 6 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,24 @@
# (metadata.json) -- and a Terraform Registry manifest file (terraform-registry-manifest.json).
#
# To validate basic correctness locally, use [nektos/act](https://nektosact.com/) in dry run mode:
#
# $ act --dryrun --workflows .github/workflows/build.yml
#
# To run the workflow locally (requires some patience -- jobs can hang without explanation):
#
# $ act 'workflow_dispatch' \
# --artifact-server-path tmp \
# --container-architecture linux/amd64 \
# --platform linux=ghcr.io/catthehacker/ubuntu:full-22.04 \
# --matrix goos:linux --matrix goarch:amd64 \
# -W .github/workflows/build.yml
#
# Useful `act` options:
#
# --secret GITHUB_TOKEN=$(gh auth token)
# --secret ACTIONS_STEP_DEBUG=true
# --action-cache-path tmp/actions/cache
# --artifact-server-path tmp/actions/artifacts

name: build

Expand Down Expand Up @@ -90,8 +107,6 @@ jobs:
upload-terraform-registry-manifest-artifact:
needs: set-product-version
runs-on: ubuntu-latest
outputs:
filepath: ${{ steps.terraform-registry-manifest.outputs.filename }}
steps:
- name: "Checkout directory"
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
Expand All @@ -103,20 +118,21 @@ jobs:
name="${{ env.PKG_NAME }}"
version="${{ needs.set-product-version.outputs.product-version }}"

source="$name/terraform-registry-manifest.json"
destination="$name_$version_manifest.json"
source="${name}/terraform-registry-manifest.json"
destination="${name}_${version}_manifest.json"

cp "$source" "$destination"
echo "filename=$destination" >> "$GITHUB_OUTPUT"

echo "### Terraform Registry manifest" >> "$GITHUB_STEP_SUMMARY"
echo "```json" >> "$GITHUB_STEP_SUMMARY"
echo '```json' >> "$GITHUB_STEP_SUMMARY"
cat "$source" >> "$GITHUB_STEP_SUMMARY"
echo "```" >> "$GITHUB_STEP_SUMMARY"
echo '```' >> "$GITHUB_STEP_SUMMARY"
- uses: actions/upload-artifact@65c4c4a1ddee5b72f698fdd19549f0f0fb45cf08 # v4.6.0
with:
name: terraform-registry-manifest.json
path: ${{ steps.terraform-registry-manifest.outputs.filename }}
if-no-files-found: error

# Builds the product for all platforms except macOS.
#
Expand Down
Loading