{"id":13531087,"url":"https://github.com/FranzDiebold/github-env-vars-action","last_synced_at":"2025-04-01T19:31:10.623Z","repository":{"id":42076015,"uuid":"239346380","full_name":"FranzDiebold/github-env-vars-action","owner":"FranzDiebold","description":":octocat: 🚀 GitHub Action for Environment Variables","archived":false,"fork":false,"pushed_at":"2024-02-10T13:22:34.000Z","size":1517,"stargazers_count":186,"open_issues_count":0,"forks_count":23,"subscribers_count":3,"default_branch":"primary","last_synced_at":"2025-03-27T15:48:38.577Z","etag":null,"topics":["cicd","deployment","environment-variables","github-action","github-actions","slug","workflow"],"latest_commit_sha":null,"homepage":"https://github.com/marketplace/actions/github-environment-variables-action","language":"JavaScript","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/FranzDiebold.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","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},"funding":{"github":"FranzDiebold"}},"created_at":"2020-02-09T17:42:38.000Z","updated_at":"2025-03-18T05:56:42.000Z","dependencies_parsed_at":"2023-12-09T00:15:31.200Z","dependency_job_id":"74c5696f-7567-451a-998c-1643f5eea87b","html_url":"https://github.com/FranzDiebold/github-env-vars-action","commit_stats":{"total_commits":74,"total_committers":3,"mean_commits":"24.666666666666668","dds":0.05405405405405406,"last_synced_commit":"5be1a823971b42aea2115f6d742484ab9a314bb6"},"previous_names":[],"tags_count":20,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FranzDiebold%2Fgithub-env-vars-action","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FranzDiebold%2Fgithub-env-vars-action/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FranzDiebold%2Fgithub-env-vars-action/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FranzDiebold%2Fgithub-env-vars-action/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/FranzDiebold","download_url":"https://codeload.github.com/FranzDiebold/github-env-vars-action/tar.gz/refs/heads/primary","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246662227,"owners_count":20813708,"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":["cicd","deployment","environment-variables","github-action","github-actions","slug","workflow"],"created_at":"2024-08-01T07:00:59.786Z","updated_at":"2025-04-01T19:31:05.607Z","avatar_url":"https://github.com/FranzDiebold.png","language":"JavaScript","funding_links":["https://github.com/sponsors/FranzDiebold"],"categories":["JavaScript","Community Resources"],"sub_categories":["Utility"],"readme":"# :octocat: :rocket: GitHub Environment Variables Action\n\n[![GitHub Action: View on Marketplace](https://img.shields.io/badge/GitHub%20Action-View_on_Marketplace-28a745?logo=github)](https://github.com/marketplace/actions/github-environment-variables-action)\n[![Demo: available](https://img.shields.io/badge/Demo-available-orange)](.github/workflows/demo.yml)\n[![Version: v2.8.0](https://img.shields.io/badge/Version-v2.8.0-brightgreen)](https://github.com/FranzDiebold/github-env-vars-action/releases/tag/v2.8.0)\n[![Lint and Test](https://github.com/FranzDiebold/github-env-vars-action/workflows/Lint%20and%20Test/badge.svg)](https://github.com/FranzDiebold/github-env-vars-action/actions?query=workflow%3A%22Lint+and+Test%22)\n[![license: MIT](https://img.shields.io/badge/license-MIT-brightgreen.svg)](./LICENSE)\n\nA [GitHub Action](https://github.com/features/actions) to expose useful environment variables.\n\n### Environment Variables exposed by **this Action**\n\n| Environment Variable Name      | Description                                                                                                                                                    | Example value                          |\n|--------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------|----------------------------------------|\n| `CI_REPOSITORY_SLUG`       | The slug of the owner and repository name (i.e. slug of `FranzDiebold/github-env-vars-action`). The slug is truncated to 63 characters.                        | `franzdiebold-github-env-vars-action`      |\n| `CI_REPOSITORY_OWNER`      | The owner of the repository.                                                                                                                                   | `FranzDiebold`                             |\n| `CI_REPOSITORY_OWNER_SLUG` | The slug of the owner of the repository. The slug is truncated to 63 characters.                                                                               | `franzdiebold`                             |\n| `CI_REPOSITORY_NAME`       | The name of the repository.                                                                                                                                    | `github-env-vars-action`                   |\n| `CI_REPOSITORY_NAME_SLUG`  | The slug of the name of the repository. The slug is truncated to 63 characters.                                                                                | `github-env-vars-action`                   |\n| `CI_REPOSITORY`            | The owner and repository name. Copy of `GITHUB_REPOSITORY` - for reasons of completeness.                                                                      | `FranzDiebold/github-env-vars-action`      |\n| `CI_REF_SLUG`              | The slug of the branch, tag or PR number *ref* that triggered the workflow (i.e. slug of `refs/heads/feat/feature-branch-1`). \u003cbr\u003eIf neither a branch, tag or PR number is available for the event type, the variable will not exist. The slug is truncated to 63 characters. | `refs-heads-feat-feature-branch-1` or\u003cbr\u003e `refs-tags-v1-3-7` or\u003cbr\u003e `refs-pull-42-merge` |\n| `CI_ACTION_REF_NAME`       | The branch or tag *name* that triggered the workflow. For pull requests it is the *head* branch name.                                                          | `feat/feature-branch-1` or\u003cbr\u003e `v1.3.7`    |\n| `CI_ACTION_REF_NAME_SLUG`  | The slug of the branch or tag *name* that triggered the workflow. For pull requests it is the slug of the *head* branch name. The slug is truncated to 63 characters. | `feat-feature-branch-1` or\u003cbr\u003e `v1-3-7`    |\n| `CI_REF_NAME`              | The branch *name*, tag *name* or PR number that triggered the workflow. \u003cbr\u003eIf neither a branch, tag or PR number is available for the event type, the variable will not exist. | `feat/feature-branch-1` or\u003cbr\u003e `v1.3.7` or\u003cbr\u003e `42/merge` |\n| `CI_REF_NAME_SLUG`         | The slug of the branch *name*, tag *name* or PR number that triggered the workflow. \u003cbr\u003eIf neither a branch, tag or PR number is available for the event type, the variable will not exist. The slug is truncated to 63 characters. | `feat-feature-branch-1` or\u003cbr\u003e `v1-3-7` or\u003cbr\u003e `42-merge` |\n| `CI_REF`                   | The branch, tag or PR number *ref* that triggered the workflow. \u003cbr\u003eIf neither a branch, tag or PR number is available for the event type, the variable will not exist. Copy of `GITHUB_REF` - for reasons of completeness. | `refs/heads/feat/feature-branch-1` or\u003cbr\u003e `refs/tags/v1.3.7` or\u003cbr\u003e `refs/pull/42/merge` |\n| `CI_HEAD_REF_SLUG`         | The slug of the head branch *name*. \u003cbr\u003eOnly set for event type *pull request* or forked repositories. The slug is truncated to 63 characters.                 | `feat-feature-branch-1`                    |\n| `CI_HEAD_REF`              | Only set for forked repositories / pull request. The branch of the head repository / the head branch name. Copy of `GITHUB_HEAD_REF` - for reasons of completeness. | `feat/feature-branch-1`               |\n| `CI_BASE_REF_SLUG`         | The slug of the base branch *name*. \u003cbr\u003eOnly set for event type *pull request* or forked repositories. The slug is truncated to 63 characters.                 | `main`                                     |\n| `CI_BASE_REF`              | Only set for forked repositories / pull request. The branch of the base repository / the base branch name. Copy of `GITHUB_BASE_REF` - for reasons of completeness. | `main`                                |\n| `CI_SHA_SHORT`             | The shortened commit SHA (8 characters) that triggered the workflow.                                                                                           | `ffac537e`                                 |\n| `CI_SHA`                   | The commit SHA that triggered the workflow. Copy of `GITHUB_SHA` - for reasons of completeness.                                                                | `ffac537e6cbbf934b08745a378932722df287a53` |\n| `CI_PR_SHA_SHORT`          | The shortened latest commit SHA in the pull request's base branch. Short version of `CI_PR_SHA`. Only set for pull requests.                                   | `010b249`                                  |\n| `CI_PR_SHA`                | The latest commit SHA in the pull request's base branch. Long version of `CI_PR_SHA_SHORT`. Only set for pull requests.                                        | `010b2491902d50e8623934f5bc43763ff5991642` |\n| `CI_PR_NUMBER`             | The number of the pull request. Only set for pull requests.                                                                                                    | `42`                                       |\n| `CI_PR_ID`                 | Copy of `CI_PR_NUMBER` for completeness.                                                                                                                       | `42`                                       |\n| `CI_PR_TITLE`              | The title of the pull request. Only set for pull requests.                                                                                                     | `Add feature xyz.`                         |\n| `CI_PR_DESCRIPTION`        | The description of the pull request. Only set for pull requests.                                                                                               | `The feature xyz is the [...]`             |\n| `CI_ACTOR`                 | The name of the person or app that initiated the workflow. Copy of `GITHUB_ACTOR` - for reasons of completeness.                                               | `octocat`                                  |\n| `CI_EVENT_NAME`            | The name of the webhook event that triggered the workflow. Copy of `GITHUB_EVENT_NAME` - for reasons of completeness.                                          | `push` or `pull_request`                   |\n| `CI_RUN_ID`                | A unique number for each run within a repository. This number does not change if you re-run the workflow run. Copy of `GITHUB_RUN_ID` - for reasons of completeness. | `397746731`                          |\n| `CI_RUN_NUMBER`            | A unique number for each run of a particular workflow in a repository. This number begins at 1 for the workflow's first run, and increments with each new run. This number does not change if you re-run the workflow run. Copy of `GITHUB_RUN_NUMBER` - for reasons of completeness. | `73` |\n| `CI_WORKFLOW`              | The name of the workflow. Copy of `GITHUB_WORKFLOW` - for reasons of completeness.                                                                             | `Demo`                                     |\n| `CI_ACTION`                | The unique identifier (`id`) of the action. Copy of `GITHUB_ACTION` - for reasons of completeness.                                                             | `run2`                                     |\n\n\u003e The [slugified](https://en.wikipedia.org/wiki/Clean_URL#Slug) values are designed to be used in a URL.\n\n### Default Environment Variables exposed by GitHub\n\nFor a full list of default environment variables exposed by GitHub see [https://docs.github.com/en/free-pro-team@latest/actions/reference/environment-variables#default-environment-variables](https://docs.github.com/en/free-pro-team@latest/actions/reference/environment-variables#default-environment-variables).\n\n| Environment Variable Name | Description                                                                                                                                     | Example value                              |\n|---------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------|--------------------------------------------|\n| `GITHUB_ACTOR`            | The name of the person or app that initiated the workflow.                                                                                      | `octocat`                                  |\n| `GITHUB_REPOSITORY`       | The owner and repository name.                                                                                                                  | `FranzDiebold/github-env-vars-action`      |\n| `GITHUB_SHA`              | The commit SHA that triggered the workflow.                                                                                                     | `ffac537e6cbbf934b08745a378932722df287a53` |\n| `GITHUB_REF`              | The branch or tag ref that triggered the workflow. \u003cbr\u003eIf neither a branch or tag is available for the event type, the variable will not exist. | `refs/heads/feat/feature-branch-1`         |\n| `GITHUB_HEAD_REF`         | Only set for forked repositories / pull request. The branch of the head repository / the head branch name.                                      | `feat/feature-branch-1`                    |\n| `GITHUB_BASE_REF`         | Only set for forked repositories / pull request. The branch of the base repository / the base branch name.                                      | `main`                                     |\n| `GITHUB_EVENT_NAME`       | The name of the webhook event that triggered the workflow.                                                                                      | `push`                                     |\n| `GITHUB_RUN_ID`           | A unique number for each run within a repository. This number does not change if you re-run the workflow run.                                   | `397746731`                                |\n| `GITHUB_RUN_NUMBER`       | A unique number for each run of a particular workflow in a repository. This number begins at 1 for the workflow's first run, and increments with each new run. This number does not change if you re-run the workflow run. | `73` |\n| `GITHUB_WORKFLOW`         | The name of the workflow.                                                                                                                       | `Demo`                                     |\n| `GITHUB_ACTION`           | The unique identifier (`id`) of the action.                                                                                                     | `run2`                                     |\n\n## :rocket: Example usage\n\n```yaml\nsteps:\n  - uses: FranzDiebold/github-env-vars-action@v2\n  - name: Print environment variables\n    run: |\n      echo \"CI_REPOSITORY_SLUG=$CI_REPOSITORY_SLUG\"\n      echo \"CI_REPOSITORY_OWNER=$CI_REPOSITORY_OWNER\"\n      echo \"CI_REPOSITORY_OWNER_SLUG=$CI_REPOSITORY_OWNER_SLUG\"\n      echo \"CI_REPOSITORY_NAME=$CI_REPOSITORY_NAME\"\n      echo \"CI_REPOSITORY_NAME_SLUG=$CI_REPOSITORY_NAME_SLUG\"\n      echo \"CI_REPOSITORY=$CI_REPOSITORY\"\n      echo \"CI_REF_SLUG=$CI_REF_SLUG\"\n      echo \"CI_ACTION_REF_NAME=$CI_ACTION_REF_NAME\"\n      echo \"CI_ACTION_REF_NAME_SLUG=$CI_ACTION_REF_NAME_SLUG\"\n      echo \"CI_REF_NAME=$CI_REF_NAME\"\n      echo \"CI_REF_NAME_SLUG=$CI_REF_NAME_SLUG\"\n      echo \"CI_REF=$CI_REF\"\n      echo \"CI_HEAD_REF_SLUG=$CI_HEAD_REF_SLUG\"\n      echo \"CI_HEAD_REF=$CI_HEAD_REF\"\n      echo \"CI_BASE_REF_SLUG=$CI_BASE_REF_SLUG\"\n      echo \"CI_BASE_REF=$CI_BASE_REF\"\n      echo \"CI_SHA_SHORT=$CI_SHA_SHORT\"\n      echo \"CI_SHA=$CI_SHA\"\n      echo \"CI_PR_SHA_SHORT=$CI_PR_SHA_SHORT\"\n      echo \"CI_PR_SHA=$CI_PR_SHA\"\n      echo \"CI_PR_NUMBER=$CI_PR_NUMBER\"\n      echo \"CI_PR_ID=$CI_PR_ID\"\n      echo \"CI_PR_TITLE=$CI_PR_TITLE\"\n      echo \"CI_PR_DESCRIPTION=$CI_PR_DESCRIPTION\"\n      echo \"CI_ACTOR=$CI_ACTOR\"\n      echo \"CI_EVENT_NAME=$CI_EVENT_NAME\"\n      echo \"CI_RUN_ID=$CI_RUN_ID\"\n      echo \"CI_RUN_NUMBER=$CI_RUN_NUMBER\"\n      echo \"CI_WORKFLOW=$CI_WORKFLOW\"\n      echo \"CI_ACTION=$CI_ACTION\"\n```\n\n### Demo\n\nA demo for all Operating systems (Linux, macOS and Windows) is also available in the [demo workflows file of this repository](.github/workflows/demo.yml)!\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FFranzDiebold%2Fgithub-env-vars-action","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FFranzDiebold%2Fgithub-env-vars-action","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FFranzDiebold%2Fgithub-env-vars-action/lists"}