🚀 GitHub Action for Environment Variables
Find a file
Priyanka Saggu 97be8087ce
correct example usage.
- `uses: franzdiebold@github-env-vars-action@v1.0.0`

It was throwing the following error:

```
Invalid workflow file
The workflow is not valid. .github/workflows/main.yml (Line: 94, Col: 13): Expected format {org}/{repo}[/path]@ref. Actual 'github-env-vars-action@v1.0.0',Input string was not in a correct format.
```
2020-05-08 20:27:35 +05:30
.gitignore Initial commit. 2020-02-10 22:41:27 +01:00
action.yml Switch to a Docker container action. 2020-02-11 10:33:47 +01:00
Dockerfile Switch to a Docker container action. 2020-02-11 10:30:39 +01:00
entrypoint.sh Make entrypoint.sh file executable. 2020-02-11 10:36:46 +01:00
LICENSE Initial commit. 2020-02-10 22:41:27 +01:00
README.md correct example usage. 2020-05-08 20:27:35 +05:30

:octocat: 🚀 GitHub Environment Variables Action

A GitHub Action to expose useful environment variables.

Environment Variables exposed by this Action

Environment Variable Name Description Example value
GITHUB_REPOSITORY_OWNER The owner of the repository. FranzDiebold
GITHUB_REPOSITORY_NAME The name of the repository. github-env-vars-action
GITHUB_REF_NAME The branch name that triggered the workflow. If neither a branch or tag is available for the event type, the variable will not exist. feature-branch-1
GITHUB_SHA_SHORT The shortened commit SHA (8 characters) that triggered the workflow. ffac537e

Default Environment Variables exposed by GitHub

For a full list of default environment variables exposed by GitHub see https://help.github.com/en/actions/configuring-and-managing-workflows/using-environment-variables#default-environment-variables.

Environment Variable Name Description Example value
GITHUB_ACTOR The name of the person or app that initiated the workflow. octocat
GITHUB_REPOSITORY The owner and repository name. FranzDiebold/github-env-vars-action
GITHUB_SHA The commit SHA that triggered the workflow. ffac537e6cbbf934b08745a378932722df287a53
GITHUB_REF The branch or tag ref that triggered the workflow. If neither a branch or tag is available for the event type, the variable will not exist. refs/heads/feature-branch-1

Example usage

steps:
  - uses: franzdiebold/github-env-vars-action@v1.0.0
  - name: Print environment variables
    run: |
      echo "GITHUB_REPOSITORY_OWNER=$GITHUB_REPOSITORY_OWNER"
      echo "GITHUB_REPOSITORY_NAME=$GITHUB_REPOSITORY_NAME"
      echo "GITHUB_REF_NAME=$GITHUB_REF_NAME"
      echo "GITHUB_SHA_SHORT=$GITHUB_SHA_SHORT"