instruction: Create a GitHub Actions workflow for CI/CD automation with automated testing
output: ## equivalence-test-update.yml
  
  **Repository:** hashicorp/terraform
  **File Type:** Github Workflow
  **Purpose:** Production configuration from hashicorp project
  
  ```yaml
  name: equivalence-test-update
  
  on:
    pull_request_target:
      types: [ closed ]
  
  permissions:
    contents: write
    pull-requests: write
  
  env:
    GH_TOKEN: ${{ github.token }}
  
  jobs:
    check:
      name: "Should run equivalence tests?"
      runs-on: ubuntu-latest
      outputs:
          should_run: ${{ steps.target_branch.outputs.should_run }}
      steps:
        - name: target_branch
          id: target_branch
          run: |
            merged='${{ github.event.pull_request.merged }}'
            target_branch='${{ github.event.pull_request.base.ref }}'
            
            targets_release_branch=false
            if [ "$target_branch" == "main" ]; then
              targets_release_branch=true
            elif [ "$target_branch" =~ ^v[0-9]+\.[0-9]+$ ]; then
              targets_release_branch=true
            fi
            
            should_run=false
            if [ "$merged" == "true" ] && [ "$targets_release_branch" == "true" ]; then
              should_run=true
            fi
            
            echo "should_run=$should_run" >> ${GITHUB_OUTPUT}
    run-equivalence-tests:
      name: "Run equivalence tests"
      needs:
        - check
      if: needs.check.outputs.should_run == 'true'
      runs-on: ubuntu-latest
      steps:
        - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
          with:
            ref: ${{ inputs.target-branch }}
  
        - name: Determine Go version
          id: go
          uses: ./.github/actions/go-version
  
        - name: Install Go toolchain
          uses: actions/setup-go@d35c59abb061a4a6fb18e82ac0862c26744d6ab5 # v5.5.0
          with:
            go-version: ${{ steps.go.outputs.version }}
            cache-dependency-path: go.sum
  
        - uses: ./.github/actions/equivalence-test
          with:
            target-equivalence-test-version: 0.5.0
            target-os: linux
            target-arch: amd64
            current-branch: ${{ github.event.pull_request.base.ref }}
            new-branch: equivalence-testing/${{ github.event.pull_request.head.ref }}
            reviewers: ${{ github.event.pull_request.merged_by.login }}
            message: "Update equivalence test golden files after ${{ github.event.pull_request.html_url }}."
  
  ```
  
  This GitHub Actions workflow demonstrates production CI/CD practices including automated testing, building, and deployment.