add cross way mirror
Some checks failed
PikaOS Package Build & Release (amd64-v3) / build (push) Has been cancelled
PikaOS Package Build & Release (Canary) (amd64-v3) / build (push) Has been cancelled
PikaOS Package Build Only (amd64-v3) / build (push) Has been cancelled
Github Push back to gitea / Push (push) Failing after 28s

This commit is contained in:
Ward from fusion-voyager-3 2024-12-05 17:33:52 +03:00
parent ef1a3f8a27
commit 2886d85bf5
9 changed files with 119 additions and 3 deletions

View File

@ -1 +1 @@
1
8

31
.github/github_pushback.sh vendored Executable file
View File

@ -0,0 +1,31 @@
#! /bin/bash
mkdir -p ~/.ssh
ssh-keyscan -H pika-os.com >> ~/.ssh/known_hosts
ssh-keyscan -H git.pika-os.com >> ~/.ssh/known_hosts
#echo -e "Host git.pika-os.com\n\tStrictHostKeyChecking no\n" >> ~/.ssh/config
#echo -e "Host git.pika-os.com\n\tIdentityFile ~/.ssh/id_rsa\n\tStrictHostKeyChecking no\n" > ~/.ssh/config
#ssh-agent -a $SSH_AUTH_SOCK > /dev/null
#ssh-add - <<< "$1"
#export GIT_SSH_COMMAND="ssh -F ~/.ssh/config"
#ssh -o StrictHostKeyChecking=no -vT git@git.pika-os.com
#ssh -vT git@git.pika-os.com
# Commit changes to git
git config --global user.name 'Github Gitea Push Back Key - Cosmo'
git config --global user.email 'cosmo@pika-os.com'
#git config --global --add safe.directory /__w/gitea-pika-first-setup/gitea-pika-first-setup
git clone git@git.pika-os.com:custom-gui-packages/pika-first-setup
rm -rfv ./gitea-pika-first-setup/.git
cp -rfv ./pika-first-setup/.git ./gitea-pika-first-setup/
cd ./gitea-pika-first-setup
git add .
git commit -am"Github Mirror Push Back"
#git config pull.rebase true
#git pull
git push

View File

@ -1 +1 @@
1
1

View File

@ -1 +1 @@
2
8

View File

@ -17,6 +17,17 @@ jobs:
options: --privileged -it
steps:
- name: Runner Origin Check
run: |
if [ "${{ secrets.RUNNER_ORIGIN }}" = "github" ]; then
exit 1
else
true
fi
env:
RUNNER_ORIGIN: ${{ secrets.RUNNER_ORIGIN }}
- uses: actions/checkout@v3
- name: Install SSH key

View File

@ -17,6 +17,17 @@ jobs:
options: --privileged -it
steps:
- name: Runner Origin Check
run: |
if [ "${{ secrets.RUNNER_ORIGIN }}" = "github" ]; then
exit 1
else
true
fi
env:
RUNNER_ORIGIN: ${{ secrets.RUNNER_ORIGIN }}
- uses: actions/checkout@v3
- name: Install SSH key

41
.github/workflows/github-pushback.yml vendored Normal file
View File

@ -0,0 +1,41 @@
name: Github Push back to gitea
on:
push:
branches:
- main
jobs:
Push:
runs-on: ubuntu-latest
container:
image: ghcr.io/pikaos-linux/pikaos-builder:nestv3
volumes:
- /proc:/proc
options: --privileged -it
steps:
- name: Runner Origin Check
run: |
if [ "${{ secrets.RUNNER_ORIGIN }}" = "github" ]; then
true
else
exit 1
fi
env:
RUNNER_ORIGIN: ${{ secrets.RUNNER_ORIGIN }}
- name: Install SSH key
uses: shimataro/ssh-key-action@v2
with:
key: ${{ secrets.GITEA_SSH_KEY }}
name: id_rsa
known_hosts: ${{ secrets.KNOWN_HOSTS }}
if_key_exists: replace
- name: Run
run: git clone https://github.com/PikaOS-Linux/gitea-pika-first-setup
- name: Run
run: ./gitea-pika-first-setup/.github/github_pushback.sh

View File

@ -17,6 +17,17 @@ jobs:
options: --privileged -it
steps:
- name: Runner Origin Check
run: |
if [ "${{ secrets.RUNNER_ORIGIN }}" = "github" ]; then
exit 1
else
true
fi
env:
RUNNER_ORIGIN: ${{ secrets.RUNNER_ORIGIN }}
- uses: actions/checkout@v3
- name: Install SSH key

View File

@ -17,6 +17,17 @@ jobs:
options: --privileged -it
steps:
- name: Runner Origin Check
run: |
if [ "${{ secrets.RUNNER_ORIGIN }}" = "github" ]; then
exit 1
else
true
fi
env:
RUNNER_ORIGIN: ${{ secrets.RUNNER_ORIGIN }}
- uses: actions/checkout@v3
- name: Install SSH key