-
Notifications
You must be signed in to change notification settings - Fork 2
39 lines (38 loc) · 1.27 KB
/
source-repo-sync.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
---
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'