Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion .github/workflows/dependabot-auto-merge.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
name: Dependabot auto-merge

on: pull_request
on:
pull_request:
types: [opened]

permissions:
contents: write
Expand Down
52 changes: 52 additions & 0 deletions .github/workflows/fork-integration-status-reporter.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
name: Report integration test results for fork PRs

on:
workflow_run:
workflows:
- "S3 Integration Tests"
- "GCS Integration Tests"
- "Alioss Integration Tests"
- "Azurebs Integration Tests"
- "DAV Integration Tests"
types: [completed]

permissions:
statuses: write

env:
GH_TOKEN: ${{ github.token }}

jobs:
report:
name: Report status
runs-on: ubuntu-latest
# Only fork-triggered runs use workflow_dispatch; skip push/pull_request runs entirely
if: github.event.workflow_run.event == 'workflow_dispatch'
steps:
- name: Get pr_ref from triggering run
id: inputs
run: |
pr_ref=$(gh run view ${{ github.event.workflow_run.id }} \
--repo "$GITHUB_REPOSITORY" --json inputs \
--jq '.inputs.pr_ref // empty')
echo "pr_ref=$pr_ref" >> $GITHUB_OUTPUT

- name: Post commit status per job
if: steps.inputs.outputs.pr_ref != ''
run: |
pr_ref="${{ steps.inputs.outputs.pr_ref }}"
gh run view ${{ github.event.workflow_run.id }} \
--repo "$GITHUB_REPOSITORY" --json jobs \
--jq '.jobs[] | [.name, .conclusion, .url] | @tsv' \
| while IFS=$'\t' read -r name conclusion url; do
case "$conclusion" in
success) state="success" ;;
cancelled) state="error" ;;
*) state="failure" ;;
esac
gh api --method POST "repos/$GITHUB_REPOSITORY/statuses/$pr_ref" \
-f state="$state" \
-f context="$name" \
-f target_url="$url" \
-f description="$conclusion"
done
1 change: 1 addition & 0 deletions .github/workflows/fork-integration-trigger.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ jobs:

- name: Trigger integration tests
run: |
# run all integration test workflows in context of main branch, passing the PR head SHA as an input
for workflow in s3-integration.yml gcs-integration.yml alioss-integration.yml azurebs-integration.yml dav-integration.yml; do
gh workflow run "$workflow" --repo "$GITHUB_REPOSITORY" --ref ${{ github.event.repository.default_branch }} -f pr_ref=${{ steps.pr.outputs.ref }} &
done
Expand Down
Loading