mirror of https://github.com/grafana/grafana
parent
5492a58f54
commit
df9f37a726
@ -0,0 +1,43 @@ |
|||||||
|
# Owned by grafana-delivery-squad |
||||||
|
# Intended to be dropped into the base repo, Ex: grafana/grafana |
||||||
|
name: Dispatch sync to mirror |
||||||
|
run-name: dispatch-sync-to-mirror-${{ github.ref_name }} |
||||||
|
on: |
||||||
|
workflow_dispatch: |
||||||
|
push: |
||||||
|
branches: |
||||||
|
- "main" |
||||||
|
- "v*.*.*" |
||||||
|
- "release-*" |
||||||
|
|
||||||
|
# This is run after the pull request has been merged, so we'll run against the target branch |
||||||
|
jobs: |
||||||
|
dispatch-job: |
||||||
|
runs-on: ubuntu-latest |
||||||
|
steps: |
||||||
|
- name: "Generate token" |
||||||
|
id: generate_token |
||||||
|
uses: tibdex/github-app-token@3beb63f4bd073e61482598c45c71c1019b59b73a |
||||||
|
with: |
||||||
|
# App needs Actions: Read/Write for the grafana/security-patch-actions repo |
||||||
|
app_id: ${{ secrets.GRAFANA_DELIVERY_BOT_APP_ID }} |
||||||
|
private_key: ${{ secrets.GRAFANA_DELIVERY_BOT_APP_PEM }} |
||||||
|
|
||||||
|
- uses: actions/github-script@v7 |
||||||
|
if: github.repository == 'grafana/grafana' |
||||||
|
with: |
||||||
|
github-token: ${{ steps.generate_token.outputs.token }} |
||||||
|
script: | |
||||||
|
await github.rest.actions.createWorkflowDispatch({ |
||||||
|
owner: 'grafana', |
||||||
|
repo: 'security-patch-actions', |
||||||
|
workflow_id: 'mirror-branch-and-apply-patches-event.yml', |
||||||
|
ref: 'main', |
||||||
|
inputs: { |
||||||
|
src_ref: "${{ github.ref_name }}", |
||||||
|
src_repo: "${{ github.repository }}", |
||||||
|
src_sha: "${{ github.sha }}", |
||||||
|
dest_repo: "${{ github.repository }}-security-mirror", |
||||||
|
patch_repo: "${{ github.repository }}-security-patches" |
||||||
|
} |
||||||
|
}) |
@ -1,25 +0,0 @@ |
|||||||
# Owned by grafana-release-guild |
|
||||||
# Intended to be dropped into the base repo, Ex: grafana/grafana |
|
||||||
name: Sync to mirror |
|
||||||
run-name: sync-to-mirror-${{ github.ref_name }} |
|
||||||
on: |
|
||||||
workflow_dispatch: |
|
||||||
push: |
|
||||||
branches: |
|
||||||
- "main" |
|
||||||
- "v*.*.*" |
|
||||||
- "release-*" |
|
||||||
|
|
||||||
# This is run after the pull request has been merged, so we'll run against the target branch |
|
||||||
jobs: |
|
||||||
trigger_downstream_patch_mirror: |
|
||||||
concurrency: patch-mirror-${{ github.ref_name }} |
|
||||||
uses: grafana/security-patch-actions/.github/workflows/mirror-branch-and-apply-patches.yml@main |
|
||||||
if: github.repository == 'grafana/grafana' |
|
||||||
with: |
|
||||||
ref: "${{ github.ref_name }}" # this is the target branch name, Ex: "main" |
|
||||||
src_repo: "${{ github.repository }}" |
|
||||||
dest_repo: "${{ github.repository }}-security-mirror" |
|
||||||
patch_repo: "${{ github.repository }}-security-patches" |
|
||||||
secrets: inherit |
|
||||||
|
|
Loading…
Reference in new issue