Skip to content

Commit

Permalink
Merge branch 'main' into automerge/add-shader
Browse files Browse the repository at this point in the history
  • Loading branch information
redaphid committed Mar 12, 2024
2 parents 4339d62 + aaf9c6d commit be4ee25
Showing 1 changed file with 5 additions and 8 deletions.
13 changes: 5 additions & 8 deletions .github/workflows/submit-shader.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,11 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v4.1.1

- name: Ensure changes are scoped to user's directory
id: scope_check
uses: actions/github-script@v5
uses: actions/github-script@v7.0.1
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
script: |
Expand All @@ -32,19 +32,16 @@ jobs:
return inUserFolder && isFragmentShader;
});
core.setOutput('valid_scope', isValidScope); // Correct way to set output
if (!isValidScope) {
console.log("PR contains changes outside the user's specific directory.");
return false;
} else {
console.log("All changes are within the user's specific directory.");
return true;
}
env:
VALID_SCOPE: ${{ steps.scope_check.outputs.result }}
- name: Merge PR if only user directory is changed and checks passed
if: env.VALID_SCOPE == 'true' && steps.checks_passed.outputs.result == 'true'
uses: actions/github-script@v5
if: steps.scope_check.outputs.valid_scope == 'true'
uses: actions/github-script@v7.0.1
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
script: |
Expand Down

0 comments on commit be4ee25

Please sign in to comment.