mirror of
https://github.com/Snigdha-OS/snigdhaos-kernel-switcher-dev.git
synced 2025-12-06 11:23:50 +01:00
32 lines
702 B
YAML
32 lines
702 B
YAML
name: Push to GitLab
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- master # Adjust the branch as needed
|
|
|
|
jobs:
|
|
sync-to-gitlab:
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
- name: Checkout Repository
|
|
uses: actions/checkout@v3
|
|
|
|
- name: Test SSH Connection
|
|
run: |
|
|
ssh -vT git@gitlab.com
|
|
|
|
- name: Set up SSH
|
|
run: |
|
|
mkdir -p ~/.ssh
|
|
echo "${{ secrets.GITLAB_SSH_KEY }}" > ~/.ssh/id_rsa
|
|
chmod 600 ~/.ssh/id_rsa
|
|
ssh-keyscan gitlab.com >> ~/.ssh/known_hosts
|
|
|
|
- name: Push to GitLab
|
|
run: |
|
|
git remote add gitlab git@gitlab.com:Snigdha-OS/snigdhaos-applications/snigdhaos-kernel-switcher-dev.git
|
|
git push --mirror gitlab
|
|
|