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

Added input parameter for ACTIONS_STEP_DEBUG #28

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from
Draft
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
17 changes: 17 additions & 0 deletions .github/workflows/setup-tofu.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,13 @@ on:
branches:
- main
pull_request:
workflow_dispatch:
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I believe this needs to be added to action.yml, not here. This script will never be called as a workflow dispatch.

inputs:
debug:
description: 'Enable debug logs for steps'
type: boolean
required: false
default: false

defaults:
run:
Expand All @@ -27,6 +34,8 @@ jobs:
uses: actions/checkout@v4

- name: Setup OpenTofu - ${{ matrix['tofu-versions'] }}
env:
ACTIONS_STEP_DEBUG: ${{ inputs.debug }}
uses: ./
with:
tofu_version: ${{ matrix['tofu-versions'] }}
Expand All @@ -50,6 +59,8 @@ jobs:
uses: actions/checkout@v4

- name: Setup OpenTofu
env:
ACTIONS_STEP_DEBUG: ${{ inputs.debug }}
uses: ./
with:
tofu_wrapper: ${{ matrix['tofu-wrapper'] }}
Expand All @@ -73,6 +84,8 @@ jobs:
run: tofu fmt -check -list=true -no-color
tofu-run-local:
name: 'OpenTofu Run Local'
env:
ACTIONS_STEP_DEBUG: ${{ inputs.debug }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
Expand Down Expand Up @@ -112,6 +125,7 @@ jobs:
os: [ubuntu-latest, windows-latest, macos-latest]
env:
TF_CLOUD_API_TOKEN: 'XXXXXXXXXXXXXX.atlasv1.XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX'
ACTIONS_STEP_DEBUG: ${{ inputs.debug }}
steps:
- name: Checkout
uses: actions/checkout@v4
Expand Down Expand Up @@ -141,6 +155,7 @@ jobs:
os: [ubuntu-latest, windows-latest, macos-latest]
env:
TF_CLOUD_API_TOKEN: 'XXXXXXXXXXXXXX.atlasv1.XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX'
ACTIONS_STEP_DEBUG: ${{ inputs.debug }}
steps:
- name: Checkout
uses: actions/checkout@v4
Expand All @@ -165,6 +180,8 @@ jobs:

tofu-credentials-none:
name: 'OpenTofu No Credentials'
env:
ACTIONS_STEP_DEBUG: ${{ inputs.debug }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
Expand Down
Loading