name: elevate
on:
  - pull_request

jobs:
  job1:
    runs-on: ubuntu-latest
    permissions: 
      contents: read
    steps:
      - uses: actions/checkout@v4
        with:
          ref: ${{ github.event.pull_request.head.sha }}          
      - run: |
          bash script.sh
      - uses: actions/upload-artifact@v4
        with:
          name: results
          path: results
          retention-days: 1

  job2:
    runs-on: ubuntu-latest
    needs: job1
    permissions:                       
      contents: write
    steps:
      - uses: actions/download-artifact@v4
        with:
          name: results
      - run: python test.py
