|
16 | 16 | steps: |
17 | 17 | - name: Checkout |
18 | 18 | uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0 |
| 19 | + with: |
| 20 | + persist-credentials: false |
19 | 21 | - name: Setup Node.js |
20 | 22 | uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0 |
21 | 23 | with: |
|
37 | 39 | steps: |
38 | 40 | - name: Checkout |
39 | 41 | uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0 |
| 42 | + with: |
| 43 | + persist-credentials: false |
40 | 44 | - name: Test Local Action (Single File Valid) |
41 | 45 | id: single-file-valid |
42 | 46 | uses: ./ |
@@ -69,14 +73,19 @@ jobs: |
69 | 73 | all-errors: true |
70 | 74 | - name: Confirm Output |
71 | 75 | uses: actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea # v7.0.1 |
| 76 | + env: |
| 77 | + SINGLE_FILE_VALID: ${{ steps.single-file-valid.outputs.valid }} |
| 78 | + SINGLE_FILE_NOT_VALID: ${{ steps.single-file-not-valid.outputs.valid }} |
| 79 | + MULTIPLE_FILE_VALID: ${{ steps.multiple-file-valid.outputs.valid }} |
| 80 | + MULTIPLE_FILE_NOT_VALID: ${{ steps.multiple-file-not-valid.outputs.valid }} |
72 | 81 | with: |
73 | 82 | script: | |
74 | 83 | const assert = require('node:assert'); |
75 | 84 |
|
76 | | - assert.strictEqual(${{ steps.single-file-valid.outputs.valid }}, true, 'Expected output for single file valid to be true'); |
77 | | - assert.strictEqual(${{ steps.single-file-not-valid.outputs.valid }}, false, 'Expected output for single file invalid to be false'); |
78 | | - assert.strictEqual(${{ steps.multiple-file-valid.outputs.valid }}, true, 'Expected output for multiple file valid to be true'); |
79 | | - assert.strictEqual(${{ steps.multiple-file-not-valid.outputs.valid }}, false, 'Expected output for multiple file invalid to be false'); |
| 85 | + assert.strictEqual(process.env.SINGLE_FILE_VALID, 'true', 'Expected output for single file valid to be true'); |
| 86 | + assert.strictEqual(process.env.SINGLE_FILE_NOT_VALID, 'false', 'Expected output for single file invalid to be false'); |
| 87 | + assert.strictEqual(process.env.MULTIPLE_FILE_VALID, 'true', 'Expected output for multiple file valid to be true'); |
| 88 | + assert.strictEqual(process.env.MULTIPLE_FILE_NOT_VALID, 'false', 'Expected output for multiple file invalid to be false'); |
80 | 89 |
|
81 | 90 | release: |
82 | 91 | name: release |
|
88 | 97 | steps: |
89 | 98 | - name: Checkout |
90 | 99 | uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0 |
| 100 | + with: |
| 101 | + persist-credentials: false |
91 | 102 | - name: Setup Node.js |
92 | 103 | uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0 |
93 | 104 | with: |
|
0 commit comments