Merge pull request #6 from FranzDiebold/feat/add-demo

Feat/add demo
This commit is contained in:
Franz Diebold 2020-07-14 09:42:15 +02:00 committed by GitHub
commit 499429c001
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 47 additions and 1 deletions

40
.github/workflows/demo.yml vendored Normal file
View 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"

View file

@ -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)!