Skip to content

Merge pull request #359 from stackhpc/cinder-sync #113

Merge pull request #359 from stackhpc/cinder-sync

Merge pull request #359 from stackhpc/cinder-sync #113

---
name: Synchronise Source Repositories
'on':
push:
branches: [main]
paths:
- '.github/workflows/source-repo-sync.yml'
- 'ansible/inventory/group_vars/all/source-repositories'
- 'ansible/roles/source-repo-sync/**'
- 'ansible/source-repo-sync.yml'
workflow_dispatch:
permissions:
contents: write
pull-requests: write
jobs:
source-repo-sync:
runs-on: ubuntu-latest
name: Synchronise source repositories
steps:
- name: Configure git 🔧
run: |
git config --global user.email "[email protected]" &&
git config --global user.name "stackhpc-ci"
- name: Github checkout 🛎
uses: actions/checkout@v4
with:
persist-credentials: 'false'
- name: Run ansible playbook 📖
run: ansible-playbook ansible/source-repo-sync.yml -i ansible/inventory
env:
ANSIBLE_FORCE_COLOR: True
GITHUB_TOKEN: ${{secrets.repository_configuration_token}}
- name: Send message to Slack via Workflow Builder
uses: ./.github/actions/slack-alert
with:
slack-webhook-url: ${{ secrets.SLACK_WEBHOOK_URL }}
slack-channel-id: ${{ vars.SLACK_CHANNEL_ID }}
if: failure() && github.event_name == 'push'