diff --git a/.github/workflows/oscar.yml b/.github/workflows/oscar.yml new file mode 100644 index 000000000..2f658fbbb --- /dev/null +++ b/.github/workflows/oscar.yml @@ -0,0 +1,30 @@ +name: OSCAR + +on: + pull_request: + types: + - opened + +jobs: + add_award: + runs-on: ubuntu-latest + permissions: + contents: write + pull-requests: write + + steps: + - name: Checkout + uses: actions/checkout@v3 + + - name: Modify awards.csv + run: echo "${{ github.actor }},pr,#${{github.event.pull_request.number}},,,,," >> awards.csv + + - name: Commit and push changes + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + run: | + git config --global user.name "github-actions[bot]" + git config --global user.email "github-actions[bot]@users.noreply.github.com" + git add updated-file.txt + git commit -m "Auto-update file on PR open" + git push origin HEAD:${{ github.event.pull_request.head.ref }} \ No newline at end of file