Skip to content

Commit a7cddaf

Browse files
Merge pull request #38 from NHSDigital/aiva2/CCM-6405_TemplateRepoSync_fixes
Aiva2/CCM-6405 template repo sync fixes
2 parents 141aa78 + d54faab commit a7cddaf

3 files changed

Lines changed: 12 additions & 11 deletions

File tree

.github/workflows/scheduled-repository-template-sync.yaml

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -16,19 +16,21 @@ jobs:
1616

1717
steps:
1818
- name: Check out the repository
19-
uses: actions/checkout@v3
19+
uses: actions/checkout@v4
2020

2121
- name: Check out external repository
22-
uses: actions/checkout@v3
22+
uses: actions/checkout@v4
2323
with:
24-
repository: nhsdigital/nhs-notify-repository-template
24+
repository: NHSDigital/nhs-notify-repository-template
2525
path: nhs-notify-repository-template
26+
token: ${{ github.token }}
2627

2728
- name: Run syncronisation script
2829
run: |
29-
/scripts/githooks/sync-template-repo.sh
30+
./scripts/githooks/sync-template-repo.sh
3031
3132
- name: Create Pull Request
33+
if: ${{ !env.ACT }}
3234
uses: peter-evans/create-pull-request@v7.0.1
3335
with:
3436
token: ${{ secrets.GITHUB_TOKEN }}
@@ -40,15 +42,12 @@ jobs:
4042
# Resultant drift from repository template
4143
4244
## Who should respond to this PR?
43-
The team which owns the responsibility for the services the repository maintains
45+
The team which owns the responsibility for this component repository. You may want to consult other contributors.
4446
4547
## How to progress this PR
46-
The repositories guardians should review the contents of the PR and decide
47-
how to proceed, you may wish to back-out certain changes or accept them from the upstream
48-
`nhsdigital/nhs-notify-repository-template` repository.
48+
The repositories guardians should review the contents of the PR and decide how to proceed, you may wish to back-out certain changes or accept them from the upstream `nhsdigital/nhs-notify-repository-template` repository.
4949
50-
If there are changes you do not wish to see again, it is recommended you add exclusions to
51-
`scripts/config/.repository-template-sync-ignore`
50+
If there are changes you do not wish to see again, it is recommended you add exclusions to `scripts/config/.repository-template-sync-ignore`.
5251
labels: |
5352
template
5453
automation

scripts/config/.repository-template-sync-ignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
# Files and folders to ignore when syncing nhs-notify-repository-template back in to this repository
22
scripts/config/.repository-template-sync-ignore
3+
.github/workflows/
4+
nhs-notify-repository-template/
35

46
# Files and Folders in this repository to ignore
57
.vscode/

scripts/githooks/sync-template-repo.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ is_ignored() {
4949
fi
5050

5151
for ignored in "${IGNORED_PATHS[@]}"; do
52-
if [[ "$file" =~ $ignored ]]; then
52+
if [[ -n "$ignored" && "$file" =~ $ignored ]]; then
5353
return 0
5454
fi
5555
done

0 commit comments

Comments
 (0)