Skip to content

Merge pull request #252 from OpSecId/change-tdw-server-dev-to-use-tra… #87

Merge pull request #252 from OpSecId/change-tdw-server-dev-to-use-tra…

Merge pull request #252 from OpSecId/change-tdw-server-dev-to-use-tra… #87

Workflow file for this run

name: Sync Changes to GitOps Repo
on:
push:
branches:
- main
workflow_dispatch:
jobs:
sync_changes:
runs-on: ubuntu-latest
if: github.repository_owner == 'bcgov'
steps:
- uses: actions/checkout@v4
- name: Checkout GitOps repo
uses: actions/checkout@v4
with:
repository: bcgov-c/ministry-gitops-ditp
ssh-key: ${{ secrets.DITP_GITOPS_REPO_SECRET }}
sparse-checkout: |
services
path: ministry-gitops-ditp
- name: Copy changes
run: |
rsync -avz --delete ./services/ ./ministry-gitops-ditp/services/
- name: Commit and push changes
run: |
cd ministry-gitops-ditp
git config user.name "github-actions[bot]"
git config user.email "github-actions[bot]@users.noreply.github.com"
git add .
git commit -m "Sync changes from trust-over-ip-configurations" || echo "No changes to commit"
git push