Skip to content

Commit

Permalink
Stricten working directory tests
Browse files Browse the repository at this point in the history
  • Loading branch information
WyriHaximus committed Jan 28, 2024
1 parent 53f35de commit 8640114
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ jobs:
id: previoustag
uses: ./
with:
workingDirecvtory: tmp/some/other/path
workingDirectory: tmp/some/other/path
- run: |
echo "Tag: ${{ steps.previoustag.outputs.tag }}"
echo "Timestamp: ${{ steps.previoustag.outputs.timestamp }}"
Expand All @@ -39,7 +39,7 @@ jobs:
uses: therussiankid92/gat@v1
with:
assertion: should.equal
expected: v1
expected: 1.8.38
actual: ${{ steps.previoustag.outputs.tag }}
get-previous-tag:
name: Test Get Previous Tag on ${{ matrix.os }}
Expand Down
2 changes: 2 additions & 0 deletions main.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ const fs = require('fs');
const tagPrefix = `${process.env.INPUT_PREFIX || ''}*`;
const workingDirectory = process.env.INPUT_WORKINGDIRECTORY || null;

console.log('\x1b[33m%s\x1b[0m', 'Working directory: ', workingDirectory || '');

exec(`git for-each-ref --sort=-creatordate --count 1 --format="%(refname:short)" "refs/tags/${tagPrefix}"`, {cwd: workingDirectory}, (err, tag, stderr) => {
tag = tag.trim();

Expand Down

0 comments on commit 8640114

Please sign in to comment.