From cf1dcb0bd50fa2303fc541830e3acddfc2d2776e Mon Sep 17 00:00:00 2001 From: Jonathan Clem Date: Fri, 21 Aug 2020 11:13:16 -0400 Subject: [PATCH] Add nicer status badges and workflow names --- .github/workflows/ci.yml | 2 ++ .github/workflows/integration.yml | 2 ++ README.md | 11 +++++++---- 3 files changed, 11 insertions(+), 4 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 33577e6..8c00050 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -1,3 +1,5 @@ +name: CI + on: push: {branches: main} pull_request: {branches: main} diff --git a/.github/workflows/integration.yml b/.github/workflows/integration.yml index 5f59f33..512e134 100644 --- a/.github/workflows/integration.yml +++ b/.github/workflows/integration.yml @@ -1,3 +1,5 @@ +name: Integration + on: push: {branches: main} diff --git a/README.md b/README.md index c0f2aef..f64a0b5 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,8 @@ -# github-script ![.github/workflows/integration.yml](https://github.com/actions/github-script/workflows/.github/workflows/integration.yml/badge.svg?event=push) ![.github/workflows/ci.yml](https://github.com/actions/github-script/workflows/.github/workflows/ci.yml/badge.svg?event=push) ![.github/workflows/licensed.yml](https://github.com/actions/github-script/workflows/Licensed/badge.svg?event=push) +# actions/github-script + +[![.github/workflows/integration.yml](https://github.com/actions/github-script/workflows/.github/workflows/Integration/badge.svg?event=push&branch=main)](https://github.com/actions/github-script/actions?query=workflow%3AIntegration+branch%3Amain+event%3Apush) +[![.github/workflows/ci.yml](https://github.com/actions/github-script/workflows/.github/workflows/CI/badge.svg?event=push&branch=main)](https://github.com/actions/github-script/actions?query=workflow%3ACI+branch%3Amain+event%3Apush) +[![.github/workflows/licensed.yml](https://github.com/actions/github-script/workflows/Licensed/badge.svg?event=push&branch=main)](https://github.com/actions/github-script/actions?query=workflow%3ALicensed+branch%3Amain+event%3Apush) This action makes it easy to quickly write a script in your workflow that uses the GitHub API and the workflow run context. @@ -202,7 +206,7 @@ jobs: console.log(script({github, context})) ``` -*Note that the script path given to `require()` must be an **absolute path** in this case, hence using [`GITHUB_WORKSPACE`](https://docs.github.com/en/actions/configuring-and-managing-workflows/using-environment-variables#default-environment-variables).* +_Note that the script path given to `require()` must be an **absolute path** in this case, hence using [`GITHUB_WORKSPACE`](https://docs.github.com/en/actions/configuring-and-managing-workflows/using-environment-variables#default-environment-variables)._ And then export a function from your module: @@ -223,7 +227,6 @@ Additionally, you'll want to use the [checkout action](https://github.com/actions/checkout) to make sure your script file is available. - This action makes it easy to quickly write a script in your workflow that uses the GitHub API and the workflow run context. @@ -426,7 +429,7 @@ jobs: console.log(script({github, context})) ``` -*Note that the script path given to `require()` must be an **absolute path** in this case, hence using [`GITHUB_WORKSPACE`](https://docs.github.com/en/actions/configuring-and-managing-workflows/using-environment-variables#default-environment-variables).* +_Note that the script path given to `require()` must be an **absolute path** in this case, hence using [`GITHUB_WORKSPACE`](https://docs.github.com/en/actions/configuring-and-managing-workflows/using-environment-variables#default-environment-variables)._ And then export a function from your module: