tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

check-workflow-run.yml (1553B)


      1 name: Check workflow_run
      2 
      3 on:
      4  workflow_call:
      5    inputs:
      6      check-refs:
      7        description: "Refs to check whether they've been updated"
      8        required: true
      9        type: string
     10    outputs:
     11      updated-refs:
     12        description: "Refs which have been updated"
     13        value: ${{ jobs.check-workflow-run.outputs.output }}
     14 
     15 jobs:
     16  check-workflow-run:
     17    name: "Check for appropriate epochs"
     18    if: ${{ github.event_name == 'workflow_run' && github.event.workflow_run.conclusion == 'success' }}
     19    runs-on: ubuntu-24.04
     20    permissions:
     21      actions: read
     22    outputs:
     23      output: ${{ steps.check.outputs.updated-refs }}
     24    steps:
     25      - name: Checkout
     26        uses: actions/checkout@v4
     27        with:
     28          fetch-depth: 1
     29          sparse-checkout: |
     30            tools
     31      - uses: actions/download-artifact@v4
     32        with:
     33          name: git-push-output
     34          path: ${{ runner.temp }}/git-push-output
     35          run-id: ${{ github.event.workflow_run.id }}
     36          github-token: ${{ secrets.GITHUB_TOKEN }}
     37      - id: check
     38        run: |
     39          {
     40              echo 'updated-refs<<EOF'
     41              python3 tools/ci/check_for_updated_refs.py
     42              echo EOF
     43          } >> "$GITHUB_OUTPUT"
     44        env:
     45          GIT_PUSH_OUTPUT: ${{ runner.temp }}/git-push-output/git-push-output.txt
     46          REFS: ${{ inputs.check-refs }}
     47 
     48  check-workflow-run-noop:
     49    name: "Check for appropriate epochs (noop)"
     50    if: ${{ github.event_name != 'workflow_run' }}
     51    runs-on: ubuntu-24.04
     52    steps:
     53      - run: exit 0