-
Notifications
You must be signed in to change notification settings - Fork 2
105 lines (71 loc) · 2.27 KB
/
ci.yaml
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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
---
name: 'CI'
on:
pull_request:
types:
- synchronize
push:
branches:
- '**'
tags:
- '*'
env:
GIT_SYNC_URL: "https://${{ secrets.GITLAB_USERNAME_ROBOT }}:${{ secrets.GITLAB_TOKEN_ROBOT }}@gitlab.com/nofusscomputing/projects/ansible/collections/centurion_erp_collection.git"
jobs:
mkdocs:
name: 'MKDocs'
permissions:
pull-requests: write
contents: write
statuses: write
checks: write
actions: write
uses: nofusscomputing/action_mkdocs/.github/workflows/reusable_mkdocs.yaml@development
collection:
name: 'Ansible Collection'
uses: nofusscomputing/action_ansible_collection/.github/workflows/reusable_ansible_collection.yaml@development
permissions:
pull-requests: write
contents: write
statuses: write
checks: write
actions: write
with:
ANSIBLE_COLLECTION_MARK_RELEASE_LIVE: true
ANSIBLE_GALAXY_NAMESPACE: "${{ github.repository_owner }}"
ANSIBLE_GALAXY_PACKAGE_NAME: "${{ github.event.repository.name }}"
ANSIBLE_LINTING_MUST_PASS: false
secrets:
ANSIBLE_GALAXY_UPLOAD_TOKEN: ${{ secrets.ANSIBLE_GALAXY_UPLOAD_TOKEN }}
gitlab-mirror:
if: ${{ github.repository == 'nofusscomputing/ansible_collection_centurion' }}
runs-on: ubuntu-latest
steps:
- name: Checks
shell: bash
run: |
if [ "0${{ env.GIT_SYNC_URL }}" == "0" ]; then
echo "[ERROR] you must define variable GIT_SYNC_URL for mirroring this repository.";
exit 1;
fi
- name: clone
shell: bash
run: |
git clone --mirror https://github.com/${{ github.repository }} repo;
ls -la repo/
- name: add remote
shell: bash
run: |
cd repo;
echo "**************************************** - git remote -v";
git remote -v;
echo "****************************************";
git remote add destination $GIT_SYNC_URL;
- name: push branches
shell: bash
run: |
cd repo;
echo "**************************************** - git branch";
git branch;
echo "****************************************";
git push destination --mirror || true;