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 5b91264
Show file tree
Hide file tree
Showing 2 changed files with 40 additions and 70 deletions.
70 changes: 0 additions & 70 deletions .github/workflows/update_leaderboard.yaml

This file was deleted.

40 changes: 40 additions & 0 deletions .github/workflows/update_leaderboard_after_merge.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
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:
filters: |
src:
- '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 }}

0 comments on commit 5b91264

Please sign in to comment.