Skip to content

oscar action

oscar action #1

Workflow file for this run

name: OSCAR
on:
pull_request:
types:
- opened
jobs:
add_award:
runs-on: ubuntu-latest
permissions:
contents: write
pull-requests: write
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
ref: ${{ github.event.pull_request.head.ref }}
persist-credentials: false
- 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 }}