Skip to content

Commit

Permalink
fix(code-previews): use HEAD commit sha for image tag (#13)
Browse files Browse the repository at this point in the history
  • Loading branch information
rexledesma authored Mar 16, 2022
1 parent 19ad709 commit 74b4a74
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions dist/preview/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -22253,7 +22253,8 @@ const {

async function run() {
try {
const imageTag = github.context.sha.substring(0, 6);
const commitSha = github.context.payload.pull_request.head.sha;
const imageTag = commitSha.substring(0, 6);

const locationFile = core.getInput("location-file");

Expand All @@ -22274,7 +22275,6 @@ async function run() {

core.info(github.context.pull_request);

const commitSha = github.context.payload.pull_request.head.sha;
const codePreview = {
commitMessage: github.context.payload.pull_request.head.label,
branchName: github.context.payload.pull_request.head.ref,
Expand Down
2 changes: 1 addition & 1 deletion dist/preview/index.js.map

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions src/preview-action.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@ const {

async function run() {
try {
const imageTag = github.context.sha.substring(0, 6);
const commitSha = github.context.payload.pull_request.head.sha;
const imageTag = commitSha.substring(0, 6);

const locationFile = core.getInput("location-file");

Expand All @@ -32,7 +33,6 @@ async function run() {

core.info(github.context.pull_request);

const commitSha = github.context.payload.pull_request.head.sha;
const codePreview = {
commitMessage: github.context.payload.pull_request.head.label,
branchName: github.context.payload.pull_request.head.ref,
Expand Down

0 comments on commit 74b4a74

Please sign in to comment.