backport of commit 2dbaa9a58b (#38098)
Some checks failed
build / Determine intended Terraform version (push) Has been cancelled
build / Determine Go toolchain version (push) Has been cancelled
Quick Checks / Unit Tests (push) Has been cancelled
Quick Checks / Race Tests (push) Has been cancelled
Quick Checks / End-to-end Tests (push) Has been cancelled
Quick Checks / Code Consistency Checks (push) Has been cancelled
build / Generate release metadata (push) Has been cancelled
build / Build for freebsd_386 (push) Has been cancelled
build / Build for linux_386 (push) Has been cancelled
build / Build for openbsd_386 (push) Has been cancelled
build / Build for windows_386 (push) Has been cancelled
build / Build for darwin_amd64 (push) Has been cancelled
build / Build for freebsd_amd64 (push) Has been cancelled
build / Build for linux_amd64 (push) Has been cancelled
build / Build for openbsd_amd64 (push) Has been cancelled
build / Build for solaris_amd64 (push) Has been cancelled
build / Build for windows_amd64 (push) Has been cancelled
build / Build for freebsd_arm (push) Has been cancelled
build / Build for linux_arm (push) Has been cancelled
build / Build for darwin_arm64 (push) Has been cancelled
build / Build for linux_arm64 (push) Has been cancelled
build / Build Docker image for linux_386 (push) Has been cancelled
build / Build Docker image for linux_amd64 (push) Has been cancelled
build / Build Docker image for linux_arm (push) Has been cancelled
build / Build Docker image for linux_arm64 (push) Has been cancelled
build / Build e2etest for linux_386 (push) Has been cancelled
build / Build e2etest for windows_386 (push) Has been cancelled
build / Build e2etest for darwin_amd64 (push) Has been cancelled
build / Build e2etest for linux_amd64 (push) Has been cancelled
build / Build e2etest for windows_amd64 (push) Has been cancelled
build / Build e2etest for linux_arm (push) Has been cancelled
build / Build e2etest for darwin_arm64 (push) Has been cancelled
build / Build e2etest for linux_arm64 (push) Has been cancelled
build / Run e2e test for linux_386 (push) Has been cancelled
build / Run e2e test for windows_386 (push) Has been cancelled
build / Run e2e test for darwin_amd64 (push) Has been cancelled
build / Run e2e test for linux_amd64 (push) Has been cancelled
build / Run e2e test for windows_amd64 (push) Has been cancelled
build / Run e2e test for linux_arm (push) Has been cancelled
build / Run e2e test for linux_arm64 (push) Has been cancelled
build / Run terraform-exec test for linux amd64 (push) Has been cancelled

Co-authored-by: Radek Simko <radek.simko@gmail.com>
This commit is contained in:
github-actions[bot] 2026-01-26 16:20:34 +00:00 committed by GitHub
parent eb12b48b94
commit bbc6e2f2c6
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -31,12 +31,16 @@ runs:
- name: "download equivalence test binary"
shell: bash
env:
TARGET_VERSION: ${{ inputs.target-equivalence-test-version }}
TARGET_OS: ${{ inputs.target-os }}
TARGET_ARCH: ${{ inputs.target-arch }}
run: |
./.github/scripts/equivalence-test.sh download_equivalence_test_binary \
${{ inputs.target-equivalence-test-version }} \
"$TARGET_VERSION" \
./bin/equivalence-tests \
${{ inputs.target-os }} \
${{ inputs.target-arch }}
"$TARGET_OS" \
"$TARGET_ARCH"
- name: Build terraform
shell: bash
@ -50,7 +54,7 @@ runs:
--tests=testing/equivalence-tests/tests \
--goldens=testing/equivalence-tests/outputs \
--binary=$(pwd)/bin/terraform
git add --intent-to-add testing/equivalence-tests/outputs
changed=$(git diff --quiet -- testing/equivalence-tests/outputs || echo true)
echo "changed=$changed" >> "${GITHUB_OUTPUT}"
@ -58,22 +62,30 @@ runs:
- name: "branch, commit, and push changes"
if: steps.execute.outputs.changed == 'true'
shell: bash
env:
NEW_BRANCH: ${{ inputs.new-branch }}
# GitHub token w/ push permissions is inherited from the calling workflow here
run: |
git config user.name "hc-github-team-tf-core"
git config user.email "github-team-tf-core@hashicorp.com"
git checkout -b ${{ inputs.new-branch }}
git checkout -b "$NEW_BRANCH"
git add testing/equivalence-tests/outputs
git commit -m "Update equivalence test golden files."
git push --set-upstream origin ${{ inputs.new-branch }}
git push --set-upstream origin "$NEW_BRANCH"
- name: "create pull request"
if: steps.execute.outputs.changed == 'true'
shell: bash
env:
CURRENT_BRANCH: ${{ inputs.current-branch }}
NEW_BRANCH: ${{ inputs.new-branch }}
PR_MESSAGE: ${{ inputs.message }}
PR_REVIEWERS: ${{ inputs.reviewers }}
run: |
gh pr create \
--draft \
--base ${{ inputs.current-branch }} \
--head ${{ inputs.new-branch }} \
--base "$CURRENT_BRANCH" \
--head "$NEW_BRANCH" \
--title "Update equivalence test golden files" \
--body '${{ inputs.message }}' \
--reviewer ${{ inputs.reviewers }}
--body "$PR_MESSAGE" \
--reviewer "$PR_REVIEWERS"