{"id":18952239,"url":"https://github.com/step-security/action-cond","last_synced_at":"2026-03-29T03:30:19.886Z","repository":{"id":247391542,"uuid":"825693023","full_name":"step-security/action-cond","owner":"step-security","description":"Conditional value for GitHub Action - missing expression for GitHub Actions ","archived":false,"fork":false,"pushed_at":"2024-11-14T21:15:02.000Z","size":305,"stargazers_count":0,"open_issues_count":11,"forks_count":1,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-01-01T02:28:26.713Z","etag":null,"topics":["step-security-maintained-actions"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/step-security.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"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":"2024-07-08T10:24:29.000Z","updated_at":"2024-10-02T22:22:11.000Z","dependencies_parsed_at":"2024-07-22T08:32:43.859Z","dependency_job_id":"e34786b4-98bc-4b5a-8086-6fac4a0fe586","html_url":"https://github.com/step-security/action-cond","commit_stats":null,"previous_names":["step-security/action-cond"],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/step-security%2Faction-cond","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/step-security%2Faction-cond/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/step-security%2Faction-cond/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/step-security%2Faction-cond/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/step-security","download_url":"https://codeload.github.com/step-security/action-cond/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":239951606,"owners_count":19723907,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":["step-security-maintained-actions"],"created_at":"2024-11-08T13:32:02.137Z","updated_at":"2026-03-29T03:30:19.838Z","avatar_url":"https://github.com/step-security.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Conditional value - missing expression for GitHub Actions\n\n\n```yaml\ninputs:\n  cond:\n    description: 'condition. [true,false]'\n    required: true\n  if_true:\n    description: 'output value if cond is true'\n  if_false:\n    description: 'output value if cond is false'\noutputs:\n  value:\n    description: 'output value'\n```\n\n\n## Usage:\n\n```yaml\nsteps:\n- uses: step-security/action-cond@v1.2.1\n  id: condval\n  with:\n    cond: ${{ github.event_name == 'pull_request' }}\n    if_true: \"value for pull request event\"\n    if_false: \"value for non pull request event\"\n- name: Use conditional value\n  run: echo \"${{ steps.condval.outputs.value }}\"\n```\n\n### Change reviewdog reporter depending on event:\n\nhttps://github.com/reviewdog/reviewdog\nhttps://github.com/reviewdog/action-eslint\n\n```yaml\nsteps:\n- uses: actions/checkout@v1\n- uses: step-security/action-cond@v1.2.1\n  id: reporter\n  with:\n    cond: ${{ github.event_name == 'pull_request' }}\n    if_true: \"github-pr-review\"\n    if_false: \"github-check\"\n- uses: reviewdog/action-eslint@v1\n  with:\n    github_token: ${{ secrets.github_token }}\n    eslint_flags: 'src/**/*.ts'\n    reporter: ${{ steps.reporter.outputs.value }}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstep-security%2Faction-cond","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fstep-security%2Faction-cond","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstep-security%2Faction-cond/lists"}