mirror of https://github.com/grafana/grafana.git
[release-11.5.5] Backport pr patch check event release 11.5.5 (#104632)
Dispatch sync to mirror / dispatch-job (push) Waiting to run
Details
Dispatch sync to mirror / dispatch-job (push) Waiting to run
Details
ci: move variables to `env` (#104605)
* ci: move variables to `env`
* ci: move sha to `env`
* ci: import `SHA` and `PRE_COMMIT_SHA`
(cherry picked from commit d19f86a736)
Co-authored-by: Sven Grossmann <sven.grossmann@grafana.com>
This commit is contained in:
parent
9d6c9b7503
commit
64a3a01892
|
|
@ -17,6 +17,13 @@ on:
|
|||
# target branch onto the source branch, to verify compatibility before merging.
|
||||
jobs:
|
||||
dispatch-job:
|
||||
env:
|
||||
HEAD_REF: ${{ github.head_ref }}
|
||||
BASE_REF: ${{ github.base_ref }}
|
||||
REPO: ${{ github.repository }}
|
||||
SENDER: ${{ github.event.sender.login }}
|
||||
SHA: ${{ github.sha }}
|
||||
PR_COMMIT_SHA: ${{ github.event.pull_request.head.sha }}
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: "Generate token"
|
||||
|
|
@ -32,18 +39,20 @@ jobs:
|
|||
with:
|
||||
github-token: ${{ steps.generate_token.outputs.token }}
|
||||
script: |
|
||||
const {HEAD_REF, BASE_REF, REPO, SENDER, SHA, PR_COMMIT_SHA} = process.env;
|
||||
|
||||
await github.rest.actions.createWorkflowDispatch({
|
||||
owner: 'grafana',
|
||||
repo: 'security-patch-actions',
|
||||
workflow_id: 'test-patches-event.yml',
|
||||
ref: 'main',
|
||||
inputs: {
|
||||
src_repo: "${{ github.repository }}",
|
||||
src_ref: "${{ github.head_ref }}",
|
||||
src_merge_sha: "${{ github.sha }}",
|
||||
src_pr_commit_sha: "${{ github.event.pull_request.head.sha }}",
|
||||
patch_repo: "${{ github.repository }}-security-patches",
|
||||
patch_ref: "${{ github.base_ref }}",
|
||||
triggering_github_handle: "${{ github.event.sender.login }}"
|
||||
src_repo: REPO,
|
||||
src_ref: HEAD_REF,
|
||||
src_merge_sha: SHA,
|
||||
src_pr_commit_sha: PR_COMMIT_SHA,
|
||||
patch_repo: REPO + '-security-patches',
|
||||
patch_ref: BASE_REF,
|
||||
triggering_github_handle: SENDER
|
||||
}
|
||||
})
|
||||
|
|
|
|||
Loading…
Reference in New Issue