Skip to content

Commit

Permalink
update lb action
Browse files Browse the repository at this point in the history
  • Loading branch information
hetulvp committed Apr 20, 2024
1 parent 63afd15 commit 5d97767
Show file tree
Hide file tree
Showing 5 changed files with 46 additions and 105 deletions.
70 changes: 0 additions & 70 deletions .github/workflows/update_leaderboard.yaml

This file was deleted.

45 changes: 45 additions & 0 deletions .github/workflows/update_leaderboard_after_merge.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
name: Update File After PR Closed

on:
push:
branches:
- development
jobs:
update-file:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Check if there are any changes in submissions dir
uses: dorny/[email protected]
id: changes
with:
# Use context to get the branch where commits were pushed.
# If there is only one long-lived branch (e.g. master),
# you can specify it directly.
# If it's not configured, the repository default branch is used.
base: ${{ github.ref }}
filters: |
src:
- added|modified: 'session_2/challenge/submissions/**'
list-files: "shell"

- name: Print changed files
run: |
echo '${{ toJSON(steps.changes.outputs) }}'
- if: ${{ (steps.changes.outputs.src_count > 1) }}
uses: actions/github-script@v7
with:
script: core.setFailed('More than one submissions are not allowed at once.')

# - name: Update file
# if: github.event_name == 'pull_request' && github.event.action == 'closed' && github.event.pull_request.merged == true
# run: |
# git config --global user.name "GitHub Actions"
# git config --global user.email "[email protected]"
# echo "Updated content" > hello.txt
# git add hello.txt
# git commit -m "Update file after PR merge"
# git push origin HEAD:${{ github.base_ref }}
Empty file added changed_files.txt
Empty file.
2 changes: 1 addition & 1 deletion session_2/challenge/submissions/baseline.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ def build_prompt(self, job_description: str) -> str:
prompt = f"""
Say "YES" if the given job description is suitable for
a freshers other wise say "NO".
a freshers other wise say "NO"
{job_description}.
Expand Down
34 changes: 0 additions & 34 deletions session_2/challenge/submissions/baseline_copy.py

This file was deleted.

0 comments on commit 5d97767

Please sign in to comment.