{"id":44778769,"url":"https://github.com/perforce/setup-p4","last_synced_at":"2026-02-16T07:18:01.129Z","repository":{"id":37964906,"uuid":"455307795","full_name":"perforce/setup-p4","owner":"perforce","description":"[Community Supported] Perforce Helix Core Actions","archived":false,"fork":false,"pushed_at":"2024-02-26T12:42:43.000Z","size":1234,"stargazers_count":29,"open_issues_count":7,"forks_count":4,"subscribers_count":9,"default_branch":"master","last_synced_at":"2026-02-11T01:41:47.038Z","etag":null,"topics":["github","github-actions","helix-core","p4","perforce"],"latest_commit_sha":null,"homepage":"https://perforce.com","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/perforce.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-02-03T19:54:37.000Z","updated_at":"2026-01-21T10:24:32.000Z","dependencies_parsed_at":"2023-11-27T17:50:16.043Z","dependency_job_id":"d44f59e2-be42-4d36-a5e4-2b061e6542ca","html_url":"https://github.com/perforce/setup-p4","commit_stats":{"total_commits":95,"total_committers":4,"mean_commits":23.75,"dds":"0.42105263157894735","last_synced_commit":"a549423ee9b5beb524c403748a2cb42e9af40487"},"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"purl":"pkg:github/perforce/setup-p4","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/perforce%2Fsetup-p4","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/perforce%2Fsetup-p4/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/perforce%2Fsetup-p4/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/perforce%2Fsetup-p4/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/perforce","download_url":"https://codeload.github.com/perforce/setup-p4/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/perforce%2Fsetup-p4/sbom","scorecard":{"id":727848,"data":{"date":"2025-08-11","repo":{"name":"github.com/perforce/setup-p4","commit":"f3d0ae6a8303877bd60e24aee16ca190d91c3c3e"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":3.8,"checks":[{"name":"Code-Review","score":0,"reason":"Found 0/3 approved changesets -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Dangerous-Workflow","score":10,"reason":"no dangerous workflow patterns detected","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Security-Policy","score":4,"reason":"security policy file detected","details":["Info: security policy file detected: SECURITY.md:1","Warn: no linked content found","Info: Found disclosure, vulnerability, and/or timelines in security policy: SECURITY.md:1","Info: Found text in security policy: SECURITY.md:1"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Pinned-Dependencies","score":4,"reason":"dependency not pinned by hash detected -- score normalized to 4","details":["Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/ci-integration.yml:26: update your workflow using https://app.stepsecurity.io/secureworkflow/perforce/setup-p4/ci-integration.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/ci.yml:14: update your workflow using https://app.stepsecurity.io/secureworkflow/perforce/setup-p4/ci.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/ci.yml:26: update your workflow using https://app.stepsecurity.io/secureworkflow/perforce/setup-p4/ci.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/labeler.yml:13: update your workflow using https://app.stepsecurity.io/secureworkflow/perforce/setup-p4/labeler.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/publish.yml:17: update your workflow using https://app.stepsecurity.io/secureworkflow/perforce/setup-p4/publish.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/publish.yml:22: update your workflow using https://app.stepsecurity.io/secureworkflow/perforce/setup-p4/publish.yml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/publish.yml:32: update your workflow using https://app.stepsecurity.io/secureworkflow/perforce/setup-p4/publish.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/stale.yml:13: update your workflow using https://app.stepsecurity.io/secureworkflow/perforce/setup-p4/stale.yml/master?enable=pin","Info:   0 out of   7 GitHub-owned GitHubAction dependencies pinned","Info:   0 out of   1 third-party GitHubAction dependencies pinned","Info:   2 out of   2 npmCommand dependencies pinned"],"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"Token-Permissions","score":0,"reason":"detected GitHub workflow tokens with excessive permissions","details":["Warn: no topLevel permission defined: .github/workflows/ci-integration.yml:1","Warn: no topLevel permission defined: .github/workflows/ci.yml:1","Warn: no topLevel permission defined: .github/workflows/labeler.yml:1","Warn: no topLevel permission defined: .github/workflows/publish.yml:1","Warn: no topLevel permission defined: .github/workflows/stale.yml:1","Info: no jobLevel write permissions found"],"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"License","score":9,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Warn: project license file does not contain an FSF or OSI license."],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":4,"reason":"branch protection is not maximal on development and all release branches","details":["Info: 'allow deletion' disabled on branch 'master'","Info: 'force pushes' disabled on branch 'master'","Warn: branch 'master' does not require approvers","Warn: codeowners review is required - but no codeowners file found in repo","Info: status check found to merge onto on branch 'master'","Info: PRs are required in order to make changes on branch 'master'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 29 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"name":"Vulnerabilities","score":5,"reason":"5 existing vulnerabilities detected","details":["Warn: Project is vulnerable to: GHSA-968p-4wvh-cqc8","Warn: Project is vulnerable to: GHSA-v6h2-p8h4-qcjw","Warn: Project is vulnerable to: GHSA-grv7-fg5c-xmjg","Warn: Project is vulnerable to: GHSA-3xgq-45jj-v275","Warn: Project is vulnerable to: GHSA-952p-6rrq-rcjv"],"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}}]},"last_synced_at":"2025-08-22T13:24:47.614Z","repository_id":37964906,"created_at":"2025-08-22T13:24:47.615Z","updated_at":"2025-08-22T13:24:47.615Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29502934,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-16T05:57:17.024Z","status":"ssl_error","status_checked_at":"2026-02-16T05:56:49.929Z","response_time":115,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["github","github-actions","helix-core","p4","perforce"],"created_at":"2026-02-16T07:17:59.502Z","updated_at":"2026-02-16T07:18:01.123Z","avatar_url":"https://github.com/perforce.png","language":"JavaScript","readme":"![Support](https://img.shields.io/badge/Support-Community-yellow.svg)\n\n# :gear: `setup-p4` [![](https://github.com/perforce/setup-p4/actions/workflows/ci.yml/badge.svg?branch=master)](https://github.com/perforce/setup-p4/actions/workflows/ci.yml)\n\n\u003e GitHub Action for running Perforce Helix Core P4 CLI [commands](https://www.perforce.com/manuals/cmdref/Content/CmdRef/commands.html).\n\nThe `perforce/setup-p4` action is a JavaScript Action that sets up Perforce Helix Core P4 CLI in your GitHub Actions workflow, allowing you to easily create interactions between your repository and your Perforce server.\n\nIn addition, the Action includes the following features:\n\n- This Action supports all GitHub Hosted and Self-Hosted Runner Operating Systems\n- Defaults to latest version of P4 CLI but can be set to a specific version \n- All P4 CLI commands can be run from the Action\n- Adds `p4` to `PATH` for easy access to P4 CLI\n- Optionally use GitHub Action Inputs to simplify setting up P4 CLI workflows\n- Connection details and credentials can be securely stored in the GitHub Action secrets\n\nMore features to come!\n\n- [Usage](#usage)\n  - [Quickstart](#quickstart)\n  - [Inputs](#inputs)\n    - [`command`](#command)\n    - [`global_options`](#global_options)\n    - [`arguments`](#arguments)\n    - [`working_directory`](#working_directory)\n    - [`spec`](#spec)\n    - [`p4_version`](#p4_version)\n  - [Configuration](#configuration)\n    - [Environment Variables](#environment-variables)\n    - [Secrets](#secrets)\n  - [Outputs](#outputs)\n    - [Output Usage](#output-usage)\n  - [Versioning](#versioning)\n  - [Helpers](#helpers)\n  - [Command Structure](#command-structure)\n    - [p4 login](#p4-login)\n    - [`STDIN` required](#stdin-required)\n    - [Everything Else](#everything-else)\n- [Example GitHub Action Workflows](#example-github-action-workflows)\n- [Detailed logs](#detailed-logs)\n- [Limitations](#limitations)\n  - [Network Connectivity](#network-connectivity)\n  - [Available Disk Space](#available-disk-space)\n- [Author Information](#author-information)\n- [Support](#support)\n- [Code of Conduct](#code-of-conduct)\n- [License](#license)\n- [Contributor's Guide](#contributors-guide)\n  - [Issues](#issues)\n  - [Discussions](#discussions)\n  - [act](#act)\n    - [.actrc](#actrc)\n    - [my.secrets](#mysecrets)\n\n## Usage\n\n### Quickstart\n\nStart by creating [GitHub Secrets](https://docs.github.com/en/actions/security-guides/encrypted-secrets#creating-encrypted-secrets-for-a-repository) for the following values. We will use these values later to connect to your Helix Core server.\n\n- P4PORT\n- P4USER\n- P4PASSWD\n\nExample:\n\n```bash\nP4PORT=\"ssl:helixcore.example.com:1666\"\nP4USER=\"ci\"\nP4PASSWD=\"mysecurepassword\"\n```\n\n\n\nAdd the `setup-p4` GitHub Action to your [GitHub Workflow](https://docs.github.com/en/actions/learn-github-actions#creating-a-workflow-file) like so:\n\n\n\nDefine a job with environment variables that will be available for all steps:\n\n``` yaml\njobs:\n  quickstart:\n    runs-on: ubuntu-latest\n    name: quickstart\n\n    env:\n      P4PORT: ${{ secrets.P4PORT }}\n      P4USER: ${{ secrets.P4USER }}\n      P4PASSWD: ${{ secrets.P4PASSWD }}\n```\n\nAdd a step that uses `perforce/setup-p4@v1`:\n\n``` yaml\nsteps:\n  - uses: perforce/setup-p4@v1\n    with:\n      command: login\n      p4_version: 21.2\n```\n\nThe above step will do the following:\n\n- based on `p4_version`, download, install, and add the P4 CLI to `PATH`. (Note: omitting this line will default to the latest version of the P4 CLI)\n- execute `p4 login` utilizing a GitHub Secret for the password with your \n\n\nNow add a simple step that verifies authentication by running the `p4 depots` command:\n\n``` yaml\nsteps:\n  - uses: perforce/setup-p4@v1\n    with:\n      command: depots\n```\n\n\nReview the [quickstart.yml](examples/quickstart.yml) for an example workflow that:\n\n- install p4 CLI\n- logs into Helix Core\n- creates a workspace (client)\n- pulls down assets from Helix Core\n\n\n\n### Inputs\n\n| Name                | Description                                                                                         | Required | Default |\n| ------------------- | --------------------------------------------------------------------------------------------------- | -------- | ------- |\n| `command`           | p4 CLI [command](#command) to execute                                                               | yes      |         |\n| `global_options`    | p4 CLI [global options](#global_options) that are supplied on the command line before the `command` | no       |         |\n| `arguments`         | arguments specific to the P4 `command` being used                                                   | no       |         |\n| `working_directory` | directory to change into before running p4 `command`                                                | no       | `.`     |\n| `spec`              | spec content that is fed into p4 stdin to create/update resources                                   | no       |         |\n| `p4_version`        | version of p4 CLI to download and cache                                                             | no       | 21.2    |\n\n\n\n#### `command`\n\n`command` supports all P4 [CLI commands](https://www.perforce.com/manuals/cmdref/Content/CmdRef/commands.html).\n\n\n#### `global_options`\n\n`global_options` supports all P4 [global options](https://www.perforce.com/manuals/cmdref/Content/CmdRef/global.options.html#Global_options).\n\nCommon `global_options` you may want to set would include\n\n- `P4PORT` by including `-p ssl:helixcore.example.com:1666` in `global_options`\n- `P4USER` by including `-u joe` in `global_options` \n\n\n#### `arguments`\n\n`arguments ` supports all P4 Command arguments.  To find available arguments first find the [command documentation](https://www.perforce.com/manuals/cmdref/Content/CmdRef/commands.html) and then look under the Options section. \n\n\n#### `working_directory`\n\nThe Action will change directory to what is provided in `working_directory`.  Note that the specified directory must exist.  \n\n\n#### `spec`\n\nIf `spec` is provided the contents of `spec` will be passed to the `STDIN` of the p4 command.  In `arguments` include the option `-i` so that p4 reads from `STDIN` instead of opening your `P4EDITOR`. (See `p4 client` in [quickstart.yml](examples/quickstart.yml) for an example.)\n\n#### `p4_version`\n\n`p4_version` defines the version of the `p4` binary that will be downloaded and cached.  `p4_version` should only be specified in a `setup` GitHub Action Step. In this step the it will check if the specified version is already present, if it is not it will be loaded, cached, and added to the `$PATH`.  All subsequent steps will be able to use the `p4` found in the `$PATH`.\n\nSee our [CI workflows](https://github.com/perforce/setup-p4/tree/master/.github/workflows) for examples.\n\n\n\n### Configuration\n\n#### Environment Variables\n\nThe [P4 CLI can utilize environment variables](https://www.perforce.com/manuals/cmdref/Content/CmdRef/envars.html) to get configuration and the same applies to p4 in GitHub Actions.  GitHub Actions allows you to set [environment variables at multiple levels](https://docs.github.com/en/actions/learn-github-actions/environment-variables):\n\n- Workflow\n- Job\n- Step\n\nNote: Because workflows are visible to other users, you should use [secrets](#secrets) to store sensitive information such as passwords.\n\n```yaml\n- name: p4 sync\n  uses: perforce/setup-p4@v1\n  env:\n  \tP4CLIENT: sdp-dev-pipeline\n  with:\n    command: sync\n    arguments: -f\n```\n\nReference the [quickstart.yml](https://github.com/perforce/setup-p4/blob/master/examples/quickstart.yml#L10) Workflow file in this repository for examples of setting environment variables at each level.\n\n#### Secrets\n\nAll p4 commands will require valid authentication to your Helix Core server.  Most Workflows will start with a `p4 login` like the following:\n\n```yaml\n- name: p4 login\n  uses: perforce/setup-p4@v1\n  with:\n    command: login\n    global_options: '-p helixcore.example.com:1666 -u joe'\n    env:\n    \tP4PASSWD: ${{ secrets.P4PASSWD }}\n```\n\nTo use the above step your GitHub Repository will need to have a Secret named `P4PASSWD` and the contents will need to be the Helix Core password of the user you want to authenticate as.\n\nYou can name your GitHub Repository Secret anything you would like but the Action expects you to set the environment variable `P4PASSWD` to your user's Helix Core password.\n\n### Outputs\n\nWhen using the provided helpers this action creates three outputs for all p4 commands: stdout, stderr, and exit_code.  The following outputs are available for subsequent steps:\n\n- `stdout` - The STDOUT stream of the call to the `p4` CLI.\n- `stderr` - The STDERR stream of the call to the `p4` CLI.\n- `exit_code` - The exit code of the call to the `p4` CLI.\n\n\n\n#### Output Usage\n\nThe following is an example of how to use each of the outputs from this action:\n\n```yaml\n- name: p4 depots\n  id: depots\n  uses: perforce/setup-p4@v1\n  with:\n    command: depots\n\n- name: echo outputs from previous step\n  run: |\n    echo \"this will print the outputs from the depots command in the previous step\"\n    echo \"stdout was: ${{ steps.depots.outputs.stdout }}\"   \n    echo \"stderr was: ${{ steps.depots.outputs.stderr }}\"\n    echo \"exit code was: ${{ steps.depots.outputs.exit_code }}\"\n```\n\n\n\n### Versioning\n\nWe recommend pinning to the latest available major version:\n\n```\n- uses: perforce/setup-p4@v1\n```\n\nThis action follows semantic versioning, but we're human and sometimes make mistakes. To prevent accidental breaking changes, you can also pin to a specific version:\n\n```\n- uses: perforce/setup-p4@v1.0.1\n```\n\nHowever, you will not get automatic security updates or new features without explicitly updating your version number. \n\n\n\n### Helpers\n\n\n\nAfter running the setup routine, subsequent steps in the same job can run arbitrary P4 CLI commands using [the GitHub Actions `run` syntax](https://help.github.com/en/actions/reference/workflow-syntax-for-github-actions#jobsjob_idstepsrun). This allows most P4 CLI commands to work exactly like they do on your local command line.  Take a look at [setup-only.yml](examples/setup-only.yml) for an example of what this looks like.\n\nAlternatively to running P4 CLI commands using the GitHub Actions `run` syntax you can use helpers that are provided by the `setup-p4` action. \n\n\n\nBenefits to using the helpers:\n\n- you don't have to worry about passing complex `spec` as `stdin` to the p4 command ([example](https://github.com/perforce/setup-p4/blob/master/examples/setup-only.yml#L44))\n- `stdout`, `stderr`, and `exit_code` are captured for you and stored as GitHub Outputs\n- Bad p4 commands, bad p4 arguments, bad p4 spec, and [pipefail](https://coderwall.com/p/fkfaqq/safer-bash-scripts-with-set-euxo-pipefail) errors are all caught and will fail the GitHub Step to prevent false positives in your pipelines\n\n\n\n### Command Structure\n\n1) Installs the p4 CLI\n2) Builds up a p4 command based on your inputs.  There are three scenarios that define how the command is built up\n   1) p4 login\n   2) `STDIN` required\n   3) everything else\n\nThis is how the command gets built up:\n\n```bash\nCOMMAND=\"p4 $GLOBAL_OPTIONS $COMMAND $ARGUMENTS\"\n```\n\n\n\n#### p4 login\n\nThe `p4 login` command will read the user password from STDIN so `$P4PASSWD` gets echoed into `$COMMAND`.\n\n\n```bash\necho \"${P4PASSWD}\" | ${COMMAND}\n```\n\n\n\n#### `STDIN` required\n\nThis command format is used whenever a p4 resource must be created or updated.  The contents of your `spec` are passed to STDIN of p4 command.\n\n```bash\necho \"${SPEC}\" | ${COMMAND}\n```\n\n\n\n#### Everything Else\n\n```bash\n${COMMAND}\n```\n\n\n\n## Example GitHub Action Workflows\n\nYou can find some example workflows that use `setup-p4` in the examples directory.  \n\n| Name           | Description                                                                                                         |\n| -------------- | ------------------------------------------------------------------------------------------------------------------- |\n| Quickstart     | Basic example that performs a p4 login, creates a workspaces, and sync files down from Helix Core.                  |\n| Setup Only     | This example performs the same steps as the Quickstart example but does not utilize any of the Action helper inputs |\n| Action Outputs | Echos the stdout, stderr, and exit code                                                                             |\n\nAdditionally here are example projects that use `setup-p4`\n\n- [setup-p4-example-build-template](https://github.com/perforce/setup-p4-example-build-template) - An example workflow that syncs content from Helix Core and publishes it to GitHub Pages.\n- More to come!\n\n## Detailed logs\n\nTo enable debug logging, create a GitHub Repository Secret named `ACTIONS_STEP_DEBUG` with the value `true`. See [here](https://docs.github.com/en/actions/monitoring-and-troubleshooting-workflows/enabling-debug-logging) for more information.  Run your workflow again and review the new debug logging.\n\n\n## Limitations\n\n### Network Connectivity\n\nGitHub Hosted Actions run in Azure so the list of [Azure IPv4 addresses](https://docs.github.com/en/actions/using-github-hosted-runners/about-github-hosted-runners#ip-addresses) must be able to reach your Helix Core instance.  To test if your Helix Core server is reachable from GitHub Hosted Actions create a workflow with the following content and run it:\n\n```bash\non:\n  workflow_dispatch:\n\nname: Network Connectivity Test\n\njobs:\n\n  network:\n    runs-on: ubuntu-latest\n    steps:\n    - run: nc -vz ${your helix core public IP} 1666\n```\n\nIf your Helix Core server is reachable you will see output like the following:\n\n```\nRun nc -vz public.perforce.com 1666\nConnection to public.perforce.com 1666 port [tcp/*] succeeded!\n```\n\nand if it is not reachable you will get an error like the following:\n\n```\nRun nc -vz public.perforce.com 1666\nnc: connect to public.perforce.com port 1666 (tcp) failed: Connection timed out\nError: Process completed with exit code 1.\n```\n\n\n\n### Available Disk Space\n\nGitHub Hosted Actions provide ~30GB of disk space to your workflow.  Depending on your P4 Client Depot mapping you may run out of disk space.  Your options are to update your Depot mapping to reduce what data is pulled down or switching to [Self Hosted GitHub Actions](https://docs.github.com/en/actions/hosting-your-own-runners/about-self-hosted-runners). \n\n\n\n\n## Author Information\n\nThis module is maintained by the contributors listed on [GitHub](https://github.com/perforce/setup-p4/graphs/contributors).\n\nDevelopment of this module is sponsored by [Perforce](https://perforce.com).\n\n\n\n## Support\n\nsetup-p4 is a community supported project. Pull requests and issues are the responsibility of the project's moderator(s); this may be a vetted individual or team with members outside of the Perforce organization. All issues should be reported and managed via GitHub (not via Perforce's standard support process).\n\n\n\n## Code of Conduct\n\nSee [CODE_OF_CONDUCT.md](/CODE_OF_CONDUCT.md)\n\n\n\n## License\n\nSee [LICENSE](/LICENSE)\n\n\n\n## Contributor's Guide\n\n\n\n### Issues\n\nPlease create an [issue](https://github.com/perforce/setup-p4/issues) for all bug or security vulnerability reports.\n\n\n\n### Discussions\n\nTo discuss feature requests, use cases, or to ask general questions please start a [discussion](https://github.com/perforce/setup-p4/discussions). \n\n\n\nHere are the steps for contributing:\n\n1) fork the project\n2) clone your fork to your workstation\n3) run `npm ci` to install all the dependencies\n4) run `npm run build` to package the action\n5) create a `.actrc` and `act.secrets` file for testing locally (examples below)\n6) run `act --job unit` , `act --job smoke`, and `act --job integration` before submitting a PR\n   1) Note that the integration tests will require a running Helix Core server.\n7) commit changes and submit PR\n\n### act\n\n[act](https://github.com/nektos/act) can be used to test GitHub Actions locally before having to commit any code. \n\n\n#### .actrc\n\nThe `.actrc` can be used to provide [default configuration](https://github.com/nektos/act#configuration) to `act`.  Example `.actrc` file to have `act` use the `act.secrets` file\n\n```\n--secret-file act.secrets\n```\n\n\n#### my.secrets\n\nCreate a `my.secrets` file (ignored via .gitignore file) that will allow the Action to authenticate to your Helix Core. \n\n```\nP4PASSWD=\"\"\nP4PORT=\"\"\nP4USER=\"\"\n```\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fperforce%2Fsetup-p4","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fperforce%2Fsetup-p4","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fperforce%2Fsetup-p4/lists"}