action-mirror-commit-status
This action mirrors a status check from one name to another on a single commit.
Why on earth would you need to mirror a status check? This is to work around a missing feature in Actions combined with missing merge queue support in some CI systems (Drone in our case).
This is the scenario:
continuous-integration/drone/pr
that mustThe problem that happens is this:
gh-readonly-queue/<target branch>/...
andpush
webhook is sent to the CI system, which starts a new build.continuous-integration/drone/push
is createdpush
instead of pr
.This action is a workaround for that scenario. There is an event sent when status checks are updated. This action listens for that event and mirrors the status from one check to another.
In the above scenario, you would configure this action to run on the status
event, when the branch
starts withgh-readonly-queue/*
like so:
on:
status:
run-name:
Mirror status ${{ github.event.context }} for ${{ github.ref }} (${{
github.event_name }})
jobs:
commit-status:
if:
github.event.context == 'continuous-integration/drone/push' &&
startsWith(github.event.branches[0].name, 'gh-readonly-queue/main/')
permissions:
statuses: write
runs-on: ubuntu-latest
steps:
- name: Mirror commit status
uses: grafana/action-mirror-commit-status@sha123456
with:
to-status: continuous-integration/drone/pr
Note that this workflow needs to be present on the target branch (main in this case).