tfaction/plan で Error: ENOENT: no such file or directory, open '/labels.txt'
エラーが起きる
#2007
-
tfaction version1.12.0 Overview
How to reproducetfaction-root.yaml plan_workflow_name: terraform_ci
label_prefixes:
skip_create_pr: true
aqua:
update_checksum:
enabled: false # default is false
skip_push: false # default is false
prune: false # default is false
tfsec:
enabled: false
tflint:
enabled: false
trivy:
enabled: false
drift_detection:
enabled: false
issue_repo_owner: xxx
issue_repo_name: xxx
num_of_issues: 1
minimum_detection_interval: 1
terraform_command: terraform
update_related_pull_requests:
enabled: false
target_groups:
- working_directory: tfenv/stg
target: stg
aws_region: ap-northeast-1
terraform_command: terraform
drift_detection:
enabled: false
terraform_plan_config:
aws_assume_role_arn: arn:aws:iam::xxx:role/actions_managed_runner_terraform_plan
terraform_apply_config:
aws_assume_role_arn: arn:aws:iam::xxx:role/actions_managed_runner_terraform_apply tfaction.yaml {} GitHub Actions Workflow name: WIP
on:
workflow_dispatch:
concurrency:
group: terraform_ci_${{ github.ref }}
cancel-in-progress: true
jobs:
plan:
strategy:
matrix:
target: ["stg"]
runs-on: ubuntu-latest
permissions:
id-token: write
contents: write
pull-requests: write
env:
TFACTION_JOB_TYPE: terraform
GH_COMMENT_SHA1: ${{github.sha}}
steps:
- uses: actions/[email protected]
with:
ref: ${{github.sha}}
- uses: actions/[email protected]
with:
path: ~/.local/share/aquaproj-aqua
key: v1-aqua-installer-${{runner.os}}-${{runner.arch}}-${{hashFiles('aqua.yaml')}}
restore-keys: |
v1-aqua-installer-${{runner.os}}-${{runner.arch}}-
- uses: aquaproj/[email protected]
with:
aqua_version: v2.21.0
- uses: suzuki-shunsuke/tfaction/[email protected]
with:
github_token: ${{secrets.GITHUB_TOKEN}}
env:
TFACTION_TARGET: ${{matrix.target}}
TF_CLI_ARGS_init: "-backend-config=ci.config"
- uses: suzuki-shunsuke/tfaction/[email protected]
with:
github_token: ${{secrets.GITHUB_TOKEN}}
env:
TFACTION_TARGET: ${{matrix.target}}
TF_CLI_ARGS_plan: "-var-file=ci.tfvars"
CI_INFO_PR_AUTHOR: "bot-desu" Other related code such as local Registry aqua.yml
GitHub Actions' log
Expected behaviourplan結果がpr commentに投稿される Actual behaviour
check-terraform-skip の pr_authorがrequiredのため、適当な
Important FactoidsNo response Noteci-info が pullRequestの情報をうまく保存できておらず、labels.txtが生成されていないようです。
|
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 8 replies
-
Thank you for reporting this issue.
https://github.com/suzuki-shunsuke/tfaction/blob/main/CONTRIBUTING.md
Lines 28 to 33 in 6dee25d tfaction/terraform-plan/action.yaml Lines 19 to 25 in 6dee25d Could you check the log of ci-info in the setup action? I think the action should fail if
|
Beta Was this translation helpful? Give feedback.
-
tfaction v1.5.1 is old. Could you try the latest version? |
Beta Was this translation helpful? Give feedback.
Oh, I see. Your workflow was triggered via
workflow_dispatch
, soci-info run
was skipped.tfaction/setup/action.yaml
Lines 28 to 33 in 6dee25d