Skip to content

Commit

Permalink
Merge pull request #60 from sohomdatta1/github-diff-fix
Browse files Browse the repository at this point in the history
Make sure the diff doesn't break the github output parser
  • Loading branch information
kapravel authored Jun 13, 2023
2 parents 1aa56a0 + c531b6b commit 0064b22
Showing 1 changed file with 16 additions and 3 deletions.
19 changes: 16 additions & 3 deletions .github/workflows/chromium-build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -44,9 +44,22 @@ jobs:
core.setOutput('chromeMajorVersion', chromeMajorVersion);
- name: Diff our changes
id: diff
run: |
GIT_DIFF_OP=$(git --no-pager diff ${{ steps.get_release.outputs.commit }}..${{ steps.get_release.outputs.currentGitCommit }} patches builder .github)
echo "diff=$GIT_DIFF_OP" >> $GITHUB_OUTPUT
uses: actions/github-script@v6
env:
oldCommit: ${{ steps.get_release.outputs.commit }}
currentCommit: ${{ steps.get_release.outputs.currentGitCommit }}
with:
script: |
let output = '';
const options = {};
options.listeners = {
stdout: (data) => {
output += data.toString();
}
};
await exec.exec( 'git', [ '--no-pager', 'diff', process.env.oldCommit + '..' + process.env.currentCommit, 'patches', 'builder', '.github' ], options );
core.setOutput('diff', btoa(output));
- name: Should we publish ?
id: shouldPublish
uses: actions/github-script@v6
Expand Down

0 comments on commit 0064b22

Please sign in to comment.