mirror of
https://github.com/tj-actions/changed-files
synced 2025-01-17 19:17:45 +00:00
fix: update test skip logic to use custom env (#2242)
This commit is contained in:
parent
246859db91
commit
b4c0974161
2 changed files with 3 additions and 2 deletions
3
.github/workflows/test.yml
vendored
3
.github/workflows/test.yml
vendored
|
@ -68,8 +68,9 @@ jobs:
|
|||
|
||||
- name: Run build and test
|
||||
run: |
|
||||
env
|
||||
yarn all
|
||||
env:
|
||||
GITHUB_EVENT_PULL_REQUEST_HEAD_REPO_FORK: ${{ github.event.pull_request.head.repo.fork }}
|
||||
|
||||
- name: Verify Changed files
|
||||
uses: tj-actions/verify-changed-files@v20
|
||||
|
|
|
@ -660,7 +660,7 @@ describe('utils test', () => {
|
|||
})
|
||||
describe('getPreviousGitTag', () => {
|
||||
// Check if the environment variable GITHUB_REPOSITORY_OWNER is 'tj-actions'
|
||||
const shouldSkip = process.env.GITHUB_REPOSITORY_OWNER !== 'tj-actions'
|
||||
const shouldSkip = !!process.env.GITHUB_EVENT_PULL_REQUEST_HEAD_REPO_FORK
|
||||
// Function returns the second-latest tag and its SHA
|
||||
it('should return the second latest tag and its SHA when multiple tags are present', async () => {
|
||||
if (shouldSkip) {
|
||||
|
|
Loading…
Reference in a new issue