-
Notifications
You must be signed in to change notification settings - Fork 0
74 lines (72 loc) · 2.15 KB
/
Copy pathcommit-via-pr.yml
File metadata and controls
74 lines (72 loc) · 2.15 KB
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
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
name: Centralized Git PR Delivery
on:
workflow_call:
inputs:
artifact_name:
type: string
description: 'Optional name of the GitHub artifact containing files generated in an upstream job'
required: false
default: ''
tracked_files:
type: string
description: 'Space-separated list of generated files to verify and commit'
required: true
git_user_name:
type: string
required: false
default: 'EthanFreestone'
git_user_email:
type: string
required: false
default: 'ethan.freestone@k-int.co.uk'
commit_message:
type: string
required: true
append_skip_ci:
type: string
required: false
default: 'true'
branch_prefix:
type: string
required: true
base_branch:
type: string
required: false
default: 'main'
pr_title:
type: string
required: true
pr_body:
type: string
required: false
default: 'Automated compliance update via pipeline.'
secrets:
GITLAB_DEPLOY_USER:
required: true
GITLAB_DEPLOY_TOKEN:
required: true
jobs:
deliver-assets:
runs-on: ubuntu-latest
permissions:
contents: write
pull-requests: write
steps:
- name: Checkout Application Repository
uses: actions/checkout@v5
with:
persist-credentials: true
- name: Commit via PR
uses: k-int/github-actions/.github/actions/commit-via-pr@main
with:
artifact_name: ${{ inputs.artifact_name }}
tracked_files: ${{ inputs.tracked_files }}
git_user_name: ${{ inputs.git_user_name }}
git_user_email: ${{ inputs.git_user_email }}
commit_message: ${{ inputs.commit_message }}
append_skip_ci: ${{ inputs.append_skip_ci }}
branch_prefix: ${{ inputs.branch_prefix }}
pr_title: ${{ inputs.pr_title }}
pr_body: ${{ inputs.pr_body }}
deploy_user: ${{ secrets.GITLAB_DEPLOY_USER }}
deploy_token: ${{ secrets.GITLAB_DEPLOY_TOKEN }}