Skip to content

Commit

Permalink
CCM-6405 Adding github workflow to sync template repo
Browse files Browse the repository at this point in the history
  • Loading branch information
aidenvaines-bjss committed Sep 11, 2024
1 parent 7887908 commit a256ef4
Showing 1 changed file with 55 additions and 0 deletions.
55 changes: 55 additions & 0 deletions .github/workflows/scheduled-repository-template-sync.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
name: Repository Template Sync

on:
schedule:
- cron: '0 0 1 * *'
workflow_dispatch:

permissions:
contents: write
pull-requests: write
checks: read

jobs:
update-external-repo:
runs-on: ubuntu-latest

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

- name: Check out external repository
uses: actions/checkout@v4
with:
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
rm -Rf ./nhs-notify-repository-template
- name: Create Pull Request
if: ${{ !env.ACT }}
uses: peter-evans/[email protected]
with:
token: ${{ secrets.GITHUB_TOKEN }}
commit-message: Drift from template
branch: scheduledTemplateRepositorySync
delete-branch: true
title: '[Template Sync] Drift from template-repository remediation'
body: |
# Resultant drift from repository template
## Who should respond to this PR?
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.
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
draft: false

0 comments on commit a256ef4

Please sign in to comment.