-
Notifications
You must be signed in to change notification settings - Fork 327
29 lines (26 loc) · 1.03 KB
/
pr.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
# Dispatch to the consul-k8s-workflows when a PR is created and on merges to main/release*
name: pr
on:
pull_request:
# these should be the only settings that you will ever need to change
env:
BRANCH: ${{ github.head_ref || github.ref_name }}
CONTEXT: "pr"
SHA: ${{ github.event.pull_request.head.sha || github.sha }}
jobs:
conditional-skip:
uses: ./.github/workflows/reusable-conditional-skip.yml
test:
name: test
needs: [ conditional-skip ]
if: needs.conditional-skip.outputs.skip-ci != 'true'
runs-on: ubuntu-latest
steps:
- uses: benc-uk/workflow-dispatch@25b02cc069be46d637e8fe2f1e8484008e9e9609 # v1.2.3
name: test
with:
workflow: test.yml
repo: hashicorp/consul-k8s-workflows
ref: main
token: ${{ secrets.ELEVATED_GITHUB_TOKEN }}
inputs: '{ "context":"${{ env.CONTEXT }}", "actor":"${{ github.actor }}", "repository":"${{ github.repository }}", "branch":"${{ env.BRANCH }}", "sha":"${{ env.SHA }}", "token":"${{ secrets.ELEVATED_GITHUB_TOKEN }}" }'