Skip to content

Commit

Permalink
Prepare for release.
Browse files Browse the repository at this point in the history
  • Loading branch information
FranzDiebold committed Jul 16, 2022
1 parent 2858253 commit d144085
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 4 deletions.
1 change: 1 addition & 0 deletions .github/workflows/demo.yml
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,7 @@ jobs:
echo "CI_REF=$CI_REF"
echo "CI_HEAD_REF_SLUG=$CI_HEAD_REF_SLUG"
echo "CI_HEAD_REF=$CI_HEAD_REF"
echo "CI_BASE_REF_SLUG=$CI_BASE_REF_SLUG"
echo "CI_BASE_REF=$CI_BASE_REF"
echo "CI_SHA_SHORT=$CI_SHA_SHORT"
echo "CI_SHA=$CI_SHA"
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

[![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)](.github/workflows/demo.yml)
[![Version: v2.4.0](https://img.shields.io/badge/Version-v2.4.0-brightgreen)](https://github.com/FranzDiebold/github-env-vars-action/releases/tag/v2.4.0)
[![Version: v2.5.0](https://img.shields.io/badge/Version-v2.5.0-brightgreen)](https://github.com/FranzDiebold/github-env-vars-action/releases/tag/v2.5.0)
[![Lint and Test](https://github.com/FranzDiebold/github-env-vars-action/workflows/Lint%20and%20Test/badge.svg)](https://github.com/FranzDiebold/github-env-vars-action/actions?query=workflow%3A%22Lint+and+Test%22)
[![license: MIT](https://img.shields.io/badge/license-MIT-brightgreen.svg)](./LICENSE)

Expand Down
7 changes: 7 additions & 0 deletions dist/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -192,6 +192,13 @@ try {
const pullRequest = github.context.payload &&
github.context.payload.pull_request;
if (pullRequest) {
const prSha = github.event.pull_request.head.sha;
core.exportVariable('CI_PR_SHA_SHORT', getShaShort(prSha));
core.info(`Set CI_PR_SHA_SHORT=${process.env.CI_PR_SHA_SHORT}`);

core.exportVariable('CI_PR_SHA', prSha);
core.info(`Set CI_PR_SHA=${process.env.CI_PR_SHA}`);

const prNumber = pullRequest.number;
core.exportVariable('CI_PR_NUMBER', prNumber);
core.info(`Set CI_PR_NUMBER=${process.env.CI_PR_NUMBER}`);
Expand Down
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "github-env-vars-action",
"version": "2.4.0",
"version": "2.5.0",
"description": "A GitHub Action to expose useful environment variables.",
"main": "index.js",
"scripts": {
Expand Down

0 comments on commit d144085

Please sign in to comment.