-
Notifications
You must be signed in to change notification settings - Fork 0
40 lines (34 loc) · 1.08 KB
/
Copy pathpush-to-codeberg.yml
File metadata and controls
40 lines (34 loc) · 1.08 KB
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
name: "Push to Codeberg"
on:
push:
branches: ["main"]
jobs:
push:
name: Push to Codeberg
runs-on: ubuntu-latest
permissions:
contents: read
steps:
- uses: actions/checkout@v6
with:
ref: ${{ github.head_ref }}
- name: Adds ssh tokens
run: |
mkdir -p ~/.ssh/
ssh-keyscan codeberg.org > ~/.ssh/known_hosts
eval "$(ssh-agent -s)"
echo "${{ secrets.SSHKEY }}" > ~/.ssh/id_ed25519
chmod 600 ~/.ssh/id_ed25519
echo "${{ secrets.SSHPUBKEY }}" > ~/.ssh/id_ed25519.pub
ssh-add ~/.ssh/id_ed25519
- name: Setup Git
run: |
git config user.name "Moheshwar Amarnath Biswas"
git config user.email "${{ secrets.EMAIL }}"
git config --global gpg.format ssh
git config --global user.signingkey ~/.ssh/
git remote add codeberg git@codeberg.org:fluentmoheshwar/shell.git
- name: Unshallows
run: git fetch --unshallow
- name: Pushes to Codeberg
run: git push codeberg --force