diff --git a/.github/workflows/hydra.yml b/.github/workflows/hydra.yml new file mode 100644 index 0000000..4814fc9 --- /dev/null +++ b/.github/workflows/hydra.yml @@ -0,0 +1,33 @@ +permissions: + contents: read + pull-requests: read +name: "Hydra" +on: + - pull_request + +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + +jobs: + add-status: + runs-on: ubuntu-latest + steps: + - uses: jwalton/gh-find-current-pr@master + id: find-pr + with: + state: all + - name: Create Pending Docs Status + uses: actions/github-script@v7 + if: contains(github.event.pull_request.labels.*.name, 'hydra') + with: + github-token: ${{ secrets.STATUS_TOKEN }} + script: | + github.rest.repos.createCommitStatus({ + owner: context.repo.owner, + repo: context.repo.repo, + sha: context.sha, + state: 'pending', + description: 'Waiting for hydra to evaluate this PR...', + context: 'ci/hydra:wire:pr_${{ steps.find-pr.outputs.number }}:packages.docs' + })