mirror of
https://github.com/FranzDiebold/github-env-vars-action.git
synced 2024-11-26 02:31:00 -05:00
commit
499429c001
2 changed files with 47 additions and 1 deletions
40
.github/workflows/demo.yml
vendored
Normal file
40
.github/workflows/demo.yml
vendored
Normal file
|
@ -0,0 +1,40 @@
|
||||||
|
name: Demo
|
||||||
|
|
||||||
|
on: [push]
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
linux:
|
||||||
|
name: Linux Demo
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- uses: franzdiebold/github-env-vars-action@v1.1.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"
|
||||||
|
|
||||||
|
windows:
|
||||||
|
name: Windows Demo
|
||||||
|
runs-on: windows-latest
|
||||||
|
steps:
|
||||||
|
- uses: franzdiebold/github-env-vars-action@v1.1.0
|
||||||
|
- name: Print environment variables
|
||||||
|
run: |
|
||||||
|
echo "GITHUB_REPOSITORY_OWNER=$Env:GITHUB_REPOSITORY_OWNER"
|
||||||
|
echo "GITHUB_REPOSITORY_NAME=$Env:GITHUB_REPOSITORY_NAME"
|
||||||
|
echo "GITHUB_REF_NAME=$Env:GITHUB_REF_NAME"
|
||||||
|
echo "GITHUB_SHA_SHORT=$Env:GITHUB_SHA_SHORT"
|
||||||
|
|
||||||
|
macos:
|
||||||
|
name: macOS Demo
|
||||||
|
runs-on: macos-latest
|
||||||
|
steps:
|
||||||
|
- uses: franzdiebold/github-env-vars-action@v1.1.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"
|
|
@ -1,7 +1,9 @@
|
||||||
# :octocat: :rocket: GitHub Environment Variables Action
|
# :octocat: :rocket: GitHub Environment Variables Action
|
||||||
|
|
||||||
|
[![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)
|
||||||
|
[![Demo: available](https://img.shields.io/badge/Demo-available-orange)](https://github.com/FranzDiebold/github-env-vars-action/actions?query=workflow%3ADemo)
|
||||||
|
[version](https://img.shields.io/github/package-json/v/FranzDiebold/github-env-vars-action/primary?label=version)
|
||||||
[![license: MIT](https://img.shields.io/badge/license-MIT-brightgreen.svg)](./LICENSE)
|
[![license: MIT](https://img.shields.io/badge/license-MIT-brightgreen.svg)](./LICENSE)
|
||||||
[version](https://img.shields.io/github/package-json/v/FranzDiebold/github-env-vars-action)
|
|
||||||
|
|
||||||
A [GitHub Action](https://github.com/features/actions) to expose useful environment variables.
|
A [GitHub Action](https://github.com/features/actions) to expose useful environment variables.
|
||||||
|
|
||||||
|
@ -38,3 +40,7 @@ steps:
|
||||||
echo "GITHUB_REF_NAME=$GITHUB_REF_NAME"
|
echo "GITHUB_REF_NAME=$GITHUB_REF_NAME"
|
||||||
echo "GITHUB_SHA_SHORT=$GITHUB_SHA_SHORT"
|
echo "GITHUB_SHA_SHORT=$GITHUB_SHA_SHORT"
|
||||||
```
|
```
|
||||||
|
|
||||||
|
### Demo
|
||||||
|
|
||||||
|
A demo for all Operating systems (Linux, macOS and Windows) is also available in the [demo workflows file of this repository](.github/workflows/demo.yml)!
|
||||||
|
|
Loading…
Reference in a new issue