Skip to content

Commit 72384bf

Browse files
committed
update it
1 parent 419493e commit 72384bf

1 file changed

Lines changed: 56 additions & 49 deletions

File tree

action.yml

Lines changed: 56 additions & 49 deletions
Original file line numberDiff line numberDiff line change
@@ -9,59 +9,66 @@ inputs:
99
description: "The base branch from the calling repository that should be merged into"
1010
required: false
1111
default: main
12+
CREATE_PULL_REQUEST_APP_ID:
13+
description: "GitHub App ID for creating pull requests"
14+
required: true
15+
CREATE_PULL_REQUEST_PEM:
16+
description: "Private key for the GitHub App in PEM format"
17+
required: true
1218
runs:
1319
using: "composite"
1420
steps:
15-
- name: Checkout calling repo code
16-
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd
17-
with:
18-
ref: ${{ inputs.calling_repo_base_branch }}
19-
fetch-depth: 0
21+
- name: Checkout calling repo code
22+
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd
23+
with:
24+
ref: ${{ inputs.calling_repo_base_branch }}
25+
fetch-depth: 0
2026

21-
- name: Checkout central repo code
22-
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd
23-
with:
24-
ref: ${{ inputs.common_workflows_ref }}
25-
fetch-depth: 0
26-
path: eps-common-workflows
27-
repository: NHSDigital/eps-common-workflows
28-
sparse-checkout: |
29-
.github/instructions/general
30-
.github/instructions/languages
31-
.github/copilot-instructions.md
32-
.github/prompts
27+
- name: Checkout central repo code
28+
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd
29+
with:
30+
ref: ${{ inputs.common_workflows_ref }}
31+
fetch-depth: 0
32+
path: eps-common-workflows
33+
repository: NHSDigital/eps-common-workflows
34+
sparse-checkout: |
35+
.github/instructions/general
36+
.github/instructions/languages
37+
.github/copilot-instructions.md
38+
.github/prompts
3339
34-
- name: Copy central instructions
35-
run: |
36-
rm -rf .github/instructions/general
37-
rm -rf .github/instructions/languages
38-
rm -rf .github/copilot-instructions.md
39-
rm -rf .github/prompts
40-
mkdir -p .github/instructions/
41-
cp -R eps-common-workflows/.github/instructions/general .github/instructions/general
42-
cp -R eps-common-workflows/.github/instructions/languages .github/instructions/languages
43-
cp eps-common-workflows/.github/copilot-instructions.md .github/copilot-instructions.md
44-
cp -R eps-common-workflows/.github/prompts .github/prompts
45-
rm -rf eps-common-workflows
40+
- name: Copy central instructions
41+
shell: bash
42+
run: |
43+
rm -rf .github/instructions/general
44+
rm -rf .github/instructions/languages
45+
rm -rf .github/copilot-instructions.md
46+
rm -rf .github/prompts
47+
mkdir -p .github/instructions/
48+
cp -R eps-common-workflows/.github/instructions/general .github/instructions/general
49+
cp -R eps-common-workflows/.github/instructions/languages .github/instructions/languages
50+
cp eps-common-workflows/.github/copilot-instructions.md .github/copilot-instructions.md
51+
cp -R eps-common-workflows/.github/prompts .github/prompts
52+
rm -rf eps-common-workflows
4653
47-
- name: Create GitHub App Token
48-
uses: actions/create-github-app-token@f8d387b68d61c58ab83c6c016672934102569859
49-
id: generate-token
50-
with:
51-
app-id: "${{ secrets.CREATE_PULL_REQUEST_APP_ID }}"
52-
private-key: "${{ secrets.CREATE_PULL_REQUEST_PEM }}"
54+
- name: Create GitHub App Token
55+
uses: actions/create-github-app-token@f8d387b68d61c58ab83c6c016672934102569859
56+
id: generate-token
57+
with:
58+
app-id: "${{ inputs.CREATE_PULL_REQUEST_APP_ID }}"
59+
private-key: "${{ inputs.CREATE_PULL_REQUEST_PEM }}"
5360

54-
- name: Create Pull Request
55-
uses: peter-evans/create-pull-request@c0f553fe549906ede9cf27b5156039d195d2ece0
56-
with:
57-
token: "${{ steps.generate-token.outputs.token }}"
58-
commit-message: "Upgrade: [dependabot] - sync Copilot instructions"
59-
title: "Upgrade: [dependabot] - sync Copilot instructions"
60-
body: |
61-
Syncing Copilot instructions from central repo.
62-
Ref: `${{ inputs.common_workflows_ref }}`
63-
branch: copilot-instructions-sync
64-
base: ${{ inputs.calling_repo_base_branch }}
65-
branch-suffix: random
66-
sign-commits: true
67-
delete-branch: true
61+
- name: Create Pull Request
62+
uses: peter-evans/create-pull-request@c0f553fe549906ede9cf27b5156039d195d2ece0
63+
with:
64+
token: "${{ steps.generate-token.outputs.token }}"
65+
commit-message: "Upgrade: [dependabot] - sync Copilot instructions"
66+
title: "Upgrade: [dependabot] - sync Copilot instructions"
67+
body: |
68+
Syncing Copilot instructions from central repo.
69+
Ref: `${{ inputs.common_workflows_ref }}`
70+
branch: copilot-instructions-sync
71+
base: ${{ inputs.calling_repo_base_branch }}
72+
branch-suffix: random
73+
sign-commits: true
74+
delete-branch: true

0 commit comments

Comments
 (0)