{"id":17722663,"url":"https://github.com/christopherhx/conditional","last_synced_at":"2025-05-07T19:47:16.898Z","repository":{"id":109928045,"uuid":"408504382","full_name":"ChristopherHX/conditional","owner":"ChristopherHX","description":"Polyfill missing if of actions/runner","archived":false,"fork":false,"pushed_at":"2022-11-28T15:41:46.000Z","size":19,"stargazers_count":9,"open_issues_count":2,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2023-03-05T03:25:18.985Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":null,"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/ChristopherHX.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":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-09-20T15:46:30.000Z","updated_at":"2022-12-09T16:24:52.000Z","dependencies_parsed_at":"2023-06-13T03:30:48.334Z","dependency_job_id":null,"html_url":"https://github.com/ChristopherHX/conditional","commit_stats":null,"previous_names":[],"tags_count":0,"template":null,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ChristopherHX%2Fconditional","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ChristopherHX%2Fconditional/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ChristopherHX%2Fconditional/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ChristopherHX%2Fconditional/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ChristopherHX","download_url":"https://codeload.github.com/ChristopherHX/conditional/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252948263,"owners_count":21830110,"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":[],"created_at":"2024-10-25T15:39:07.534Z","updated_at":"2025-05-07T19:47:16.879Z","avatar_url":"https://github.com/ChristopherHX.png","language":null,"funding_links":[],"categories":[],"sub_categories":[],"readme":"# conditional\nPolyfill missing if of actions/runner\n\n## Usage:\n\n- You have to surround the if condition with `${{...}}` otherwise it won't work.\n- The pipe symbol ( `|` ) after `step:` is required, because inputs have to be strings.\n- Expression syntax will even work on places github wouldn't allow (step property)\n- Pre steps aren't executed, because they won't work with local actions.\n```yaml\n- uses: ChristopherHX/conditional@a675ed4b9377f0f6e385f1c992f4a53de60ec521\n  with:\n    if: ${{steps.cacheaction.outputs.cache-hit != 'true'}}\n    step: |\n      uses: actions/setup-node@v3\n      with:\n        node-version: ${{inputs.nodever}}\n```\n\n[Full example](https://github.com/ChristopherHX/conditional/blob/main/.github/tests/test1/action.yml)\n\n## How does it work?\n\nThis small composite action create a temporary child composite action in `./.github/conditional/tmp/`, based on the evaluated condition and your provided step, therefore you can skip a uses directive. If the condition evaluates to false, it executes an empty action instead.\nThe usage of `- uses: actions/github-script@v6` allows this action to work on linux / windows / mac without the need for `bash` or downloading any other shell.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fchristopherhx%2Fconditional","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fchristopherhx%2Fconditional","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fchristopherhx%2Fconditional/lists"}