Skip to content

Commit

Permalink
Merge pull request #38 from NHSDigital/aiva2/CCM-6405_TemplateRepoSyn…
Browse files Browse the repository at this point in the history
…c_fixes

Aiva2/CCM-6405 template repo sync fixes
  • Loading branch information
aidenvaines-bjss authored Sep 10, 2024
2 parents 141aa78 + d54faab commit a7cddaf
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 11 deletions.
19 changes: 9 additions & 10 deletions .github/workflows/scheduled-repository-template-sync.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,19 +16,21 @@ jobs:

steps:
- name: Check out the repository
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Check out external repository
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
repository: nhsdigital/nhs-notify-repository-template
repository: NHSDigital/nhs-notify-repository-template
path: nhs-notify-repository-template
token: ${{ github.token }}

- name: Run syncronisation script
run: |
/scripts/githooks/sync-template-repo.sh
./scripts/githooks/sync-template-repo.sh
- name: Create Pull Request
if: ${{ !env.ACT }}
uses: peter-evans/[email protected]
with:
token: ${{ secrets.GITHUB_TOKEN }}
Expand All @@ -40,15 +42,12 @@ jobs:
# Resultant drift from repository template
## Who should respond to this PR?
The team which owns the responsibility for the services the repository maintains
The team which owns the responsibility for this component repository. You may want to consult other contributors.
## How to progress this PR
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.
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.
If there are changes you do not wish to see again, it is recommended you add exclusions to
`scripts/config/.repository-template-sync-ignore`
If there are changes you do not wish to see again, it is recommended you add exclusions to `scripts/config/.repository-template-sync-ignore`.
labels: |
template
automation
Expand Down
2 changes: 2 additions & 0 deletions scripts/config/.repository-template-sync-ignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# Files and folders to ignore when syncing nhs-notify-repository-template back in to this repository
scripts/config/.repository-template-sync-ignore
.github/workflows/
nhs-notify-repository-template/

# Files and Folders in this repository to ignore
.vscode/
Expand Down
2 changes: 1 addition & 1 deletion scripts/githooks/sync-template-repo.sh
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ is_ignored() {
fi

for ignored in "${IGNORED_PATHS[@]}"; do
if [[ "$file" =~ $ignored ]]; then
if [[ -n "$ignored" && "$file" =~ $ignored ]]; then
return 0
fi
done
Expand Down

0 comments on commit a7cddaf

Please sign in to comment.