![]() name: Delete all summary content run: | The resulting environment variable is named STATE_processID with the value of 12345: This example uses JavaScript to write to the GITHUB_STATE file. The saved value is stored as an environment value with the STATE_ prefix. The GITHUB_STATE file is only available within an action. For more information on the post: action, see " Metadata syntax for GitHub Actions." If you have multiple pre: or post: actions, you can only access the saved value in the action where it was written to GITHUB_STATE. Alternatively, you could create a file with the main: action, pass the file location to the post: action, and also use the post: action to delete the file. For example, you can create a file with the pre: action, pass the file location to the main: action, and then use the post: action to delete the file. You can create environment variables for sharing with your workflow's pre: or post: actions by writing to the file located at GITHUB_STATE. Write-Output '::warning:: This is a warning again, because stop-commands has been turned off.' Sending values to the pre and post actions # Write-Output '::warning:: This will NOT be rendered as a warning, because stop-commands has been invoked.' Write-Output "::stop-commands::$stopMarker" Write-Output '::warning:: This is a warning message, to demonstrate that commands are being processed.' YAML jobs: workflow-command-job: runs-on: windows-latest steps: - name: Disable workflow commands run: | For example, you could stop logging to output an entire script that has comments. This special command allows you to log anything without accidentally running a workflow command. Set-Variable -Name Retrieved_Secret -Value (Retrieve-Secret "$Secret_Handle")Įcho "We retrieved our masked secret: $Retrieved_Secret" Stopping and starting workflow commands # The following table shows which toolkit functions are available within a workflow: Toolkit functionĪccessible using environment file GITHUB_PATHĪccessible using environment file GITHUB_ENVĪccessible using environment variable INPUT_" YAML - name: Create annotation for build error run: Write-Output "::error file=app.js,line=1::Missing semicolon"
0 Comments
Leave a Reply. |