2024-04-29 09:19:55
This commit is contained in:
parent
5f1868ca75
commit
141fb9f415
|
@ -123,44 +123,6 @@ jobs:
|
|||
dst_user: '${{ secrets.BOT_MIRROR_NAME }}'
|
||||
dst_token: '${{ secrets.BOT_MIRROR_TOKEN_MOSHUB }}'
|
||||
|
||||
# ------------------------------------------------------------------------------------------------------------------ #
|
||||
# GIT.ORG.RU.
|
||||
# ------------------------------------------------------------------------------------------------------------------ #
|
||||
|
||||
mirror_gitorgru:
|
||||
runs-on: ubuntu-latest
|
||||
name: 'GIT.ORG.RU'
|
||||
env:
|
||||
DOMAIN: 'https://git.org.ru'
|
||||
VERSION: 'v1'
|
||||
steps:
|
||||
- name: 'Get repository name'
|
||||
shell: bash
|
||||
run: |
|
||||
echo "REPO_NAME=$( echo '${{ github.repository }}' | awk -F '/' '{ print $2 }' )" >> $GITHUB_ENV
|
||||
- name: 'Create repository'
|
||||
shell: bash
|
||||
run: |
|
||||
http="$( curl -s -o '/dev/null' -I -w '%{http_code}' -A '${{ env.USER_AGENT }}' '${{ env.DOMAIN }}/${{ env.OWNER }}/${{ env.REPO_NAME }}' )"
|
||||
if [[ "${http}" -ne 200 ]]; then
|
||||
curl -X POST \
|
||||
-H 'Authorization: token ${{ secrets.BOT_MIRROR_TOKEN_GITORGRU }}' \
|
||||
-H 'Accept: application/json' \
|
||||
-H 'Content-Type: application/json' \
|
||||
-A '${{ env.USER_AGENT }}' \
|
||||
'${{ env.DOMAIN }}/api/${{ env.VERSION }}/orgs/${{ env.OWNER }}/repos' \
|
||||
-d '{"name":"${{ env.REPO_NAME }}"}'
|
||||
fi
|
||||
- name: 'Mirror repository'
|
||||
uses: ghastore/github-mirror@main
|
||||
with:
|
||||
src_repo: '${{ github.server_url }}/${{ github.repository }}.git'
|
||||
src_user: '${{ secrets.BOT_MIRROR_NAME }}'
|
||||
src_token: '${{ secrets.BOT_MIRROR_TOKEN_GITHUB }}'
|
||||
dst_repo: '${{ env.DOMAIN }}/${{ env.OWNER }}/${{ env.REPO_NAME }}.git'
|
||||
dst_user: '${{ secrets.BOT_MIRROR_NAME }}'
|
||||
dst_token: '${{ secrets.BOT_MIRROR_TOKEN_GITORGRU }}'
|
||||
|
||||
# ------------------------------------------------------------------------------------------------------------------ #
|
||||
# Disroot.
|
||||
# ------------------------------------------------------------------------------------------------------------------ #
|
||||
|
|
|
@ -55,7 +55,7 @@ the syntax highlighting language from the file extension will be automatically s
|
|||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="card-body p-0" id="cp-{{ ($cp) }}">
|
||||
<div class="card-body p-0 overflow-auto" id="cp-{{ ($cp) }}">
|
||||
{{ if (eq (($lang) | len) 0) }}
|
||||
{{ $lang = ((replace (path.Ext (.Name)) "." "") | default "plaintext") }}
|
||||
{{ end }}
|
||||
|
|
Loading…
Reference in New Issue