Skip to content

Commit

Permalink
ci: add initial CI
Browse files Browse the repository at this point in the history
. #1
  • Loading branch information
jon-nfc committed Aug 14, 2024
1 parent db3f373 commit c98c3ed
Show file tree
Hide file tree
Showing 2 changed files with 105 additions and 0 deletions.
90 changes: 90 additions & 0 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,90 @@
---

name: 'CI'


on:
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:


gitlab-mirror:
if: ${{ github.repository == 'nofusscomputing/centurion_erp' }}
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 --all --force;
git push destination --mirror || true;
# - name: push tags
# shell: bash
# run: |

# cd repo;

# echo "**************************************** - git tag";

# git tag;

# echo "****************************************";

# git push destination --tags --force;
15 changes: 15 additions & 0 deletions .github/workflows/pull_request.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@

---

name: Pull Requests


on:
pull_request: {}


jobs:

pull-requests:
name: Pull Request
uses: nofusscomputing/action_pull_requests/.github/workflows/pull-requests.yaml@development

0 comments on commit c98c3ed

Please sign in to comment.