Skip to content

Commit

Permalink
Enable trace based on debug flag
Browse files Browse the repository at this point in the history
  • Loading branch information
lucacome committed Jan 27, 2023
1 parent 312448d commit 503d539
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
6 changes: 4 additions & 2 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ jobs:
continue-on-error: true
steps:
- name: Checkout Repository
uses: actions/checkout@v2
uses: actions/checkout@v3
- name: Test Action
id: test
uses: ./
Expand Down Expand Up @@ -64,6 +64,8 @@ jobs:
base-image: nginx:1.21.0
image: nginx/nginx-ingress:2.1.0
platforms: linux/arm64
env:
DEBUG: ${{ secrets.ACTIONS_STEP_DEBUG }}
- name: Get Test Output
run: echo "Workflow Docker Image ${{ steps.test.outputs.needs-updating }}"
- name: Check value
Expand Down Expand Up @@ -100,7 +102,7 @@ jobs:
continue-on-error: true
steps:
- name: Checkout Repository
uses: actions/checkout@v2
uses: actions/checkout@v3
- name: Test Action
id: test
uses: ./
Expand Down
3 changes: 2 additions & 1 deletion action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,8 @@ runs:
steps:
- id: run-script
run: |
result=$(base=${{ inputs.base-image }} image=${{ inputs.image }} platforms=${{ inputs.platforms }} ${{ github.action_path }}/docker.sh)
echo DEBUG=$DEBUG
result=$(TRACE=${{ env.DEBUG == 'true' && '1' || '0' }} base=${{ inputs.base-image }} image=${{ inputs.image }} platforms=${{ inputs.platforms }} ${{ github.action_path }}/docker.sh)
echo "result=${result}" >>$GITHUB_OUTPUT
shell: bash

Expand Down

0 comments on commit 503d539

Please sign in to comment.