diff --git a/.github/workflows/demo.yml b/.github/workflows/demo.yml new file mode 100644 index 0000000..f46ef5c --- /dev/null +++ b/.github/workflows/demo.yml @@ -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=$GITHUB_REPOSITORY_OWNER" + echo "GITHUB_REPOSITORY_NAME=$GITHUB_REPOSITORY_NAME" + echo "GITHUB_REF_NAME=$GITHUB_REF_NAME" + echo "GITHUB_SHA_SHORT=$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" diff --git a/README.md b/README.md index d83f3ab..52ebe55 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,9 @@ # :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/) +[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) -[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.