Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] On pull_request_review error #906

Closed
2 tasks done
SamuelMolling opened this issue Dec 29, 2022 · 2 comments · Fixed by #915
Closed
2 tasks done

[BUG] On pull_request_review error #906

SamuelMolling opened this issue Dec 29, 2022 · 2 comments · Fixed by #915
Labels
bug Something isn't working

Comments

@SamuelMolling
Copy link

Is there an existing issue for this?

  • I have searched the existing issues

Does this issue exist in the latest version?

  • I'm using the latest release

Describe the bug?

I use a plan file with a pull_request event and an apply one with a pull_request_review (submitted) event, the only difference between them is basically the event, before switching to this pull_request_review event, the same file was pull and it worked fine

name: 'Terragrunt Apply'
on:
  pull_request_review:
    types: [submitted]
    paths:
      -  teste/resources/**/*.hcl
    branches:
      - master
      - staging
      - develop
jobs:
  terragrunt:
    name: "Terragrunt"
    runs-on: <runs-on>
    steps:
      - name: Setup Terraform
        uses: hashicorp/setup-terraform@v1
        with:
          terraform_wrapper: false
      
      - name: Setup Terragrunt
        uses: autero1/action-terragrunt@v1.2.0
        with:
          terragrunt_version: latest
      
      - name: Set up GCP SDK
        uses: google-github-actions/setup-gcloud@v0
        with:
          service_account_key: ${{ secrets.GOOGLE_CREDENTIALS }}
      
      - uses: actions/checkout@v3
        with:
          fetch-depth: 0
      
      - name: Run changed-files with dir_names
        id: changed-files-dir-names
        uses: tj-actions/changed-files@v35
        with:
          dir_names: "true"
          files: |
            teste/resources/**

To Reproduce

Basically trying to create a file on that path and after the reviewer approves it gives the error

What OS are you seeing the problem on?

ubuntu-latest or ubuntu-20.04

Expected behavior?

The terraform plan works, finding the files without problems, it runs in the pull_request event, but the apply error

Relevant log output

Run tj-actions/changed-files@v35
  with:
    dir_names: true
    files: teste/resources/**
  
    separator:  
    include_all_old_new_renamed_files: false
    old_new_separator: ,
    old_new_files_separator:  
    files_separator: 
  
    files_ignore_separator: 
  
    path: .
    quotepath: true
    json: false
    fetch_depth: 50
    since_last_remote_commit: false
    write_output_files: false
    output_dir: .github/outputs
    match_directories: true
  env:
    CLOUDSDK_METRICS_ENVIRONMENT: github-actions-setup-gcloud
Run # "Calculating the previous and current SHA..."
  # "Calculating the previous and current SHA..."
  bash $GITHUB_ACTION_PATH/diff-sha.sh
  shell: /usr/bin/bash --noprofile --norc -e -o pipefail {0}
  env:
    CLOUDSDK_METRICS_ENVIRONMENT: X
    GITHUB_SERVER_URL: https://github.com
    GITHUB_REPOSITORY: x
    GITHUB_REF: refs/pull/197/merge
    GITHUB_SHA: c[2](https://github.com/x/actions/runs/3803406209/jobs/6469787657#step:6:2)8cfe48a015e9fe0[3](https://github.com/x/actions/runs/3803406209/jobs/6469787657#step:6:3)5c72[4](https://github.com/x/actions/runs/3803406209/jobs/6469787657#step:6:4)8[5](https://github.com/x/actions/runs/3803406209/jobs/6469787657#step:6:5)4[6](https://github.com/x/actions/runs/3803406209/jobs/6469787657#step:6:6)8f0144229e1b9
    GITHUB_BASE_REF: 
    GITHUB_HEAD_REF: 
    GITHUB_WORKSPACE: /home/gitrunner/actions-runner/_work/x
    GITHUB_EVENT_NUMBER: 
    GITHUB_EVENT_HEAD_REPO_FORK: false
    GITHUB_EVENT_PULL_REQUEST_BASE_SHA: d98df45346631e33c1898ff4fe63acc106e13951
    GITHUB_EVENT_PULL_REQUEST_HEAD_SHA: 3b39bc96e9a93[7](https://github.com/x)f044efadce0f610edf43[8](https://github.com/X:8)0f[9](https://github.com/X)25
    GITHUB_EVENT_PULL_REQUEST_COMMITS: 
    GITHUB_EVENT_BEFORE: 
    GITHUB_EVENT_FORCED: 
    GITHUB_REFNAME: 197/merge
    INPUT_SHA: 
    INPUT_BASE_SHA: 
    INPUT_SINCE: 
    INPUT_UNTIL: 
    INPUT_PATH: .
    INPUT_FETCH_DEPTH: 50
    INPUT_SINCE_LAST_REMOTE_COMMIT: false
changed-files-diff-sha
  Verifying git version...
  Valid git version found: (2.33.0)
  Running on a push event...
  Fetching remote refs...
  Error: Process completed with exit code [12](https://github.com/X)8.


### Anything else?

_No response_

### Code of Conduct

- [X] I agree to follow this project's Code of Conduct
@SamuelMolling SamuelMolling added the bug Something isn't working label Dec 29, 2022
@github-actions
Copy link
Contributor

Thanks for reporting this issue, don't forget to star this project if you haven't already to help us reach a wider audience.

@jackton1 jackton1 linked a pull request Jan 1, 2023 that will close this issue
@jackton1
Copy link
Member

jackton1 commented Jan 3, 2023

@SamuelMolling This issue has been resolved in the latest release.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants