diff --git a/.github/workflows/mirror.yml b/.github/workflows/mirror.yml index 405e6de..a329dad 100644 --- a/.github/workflows/mirror.yml +++ b/.github/workflows/mirror.yml @@ -10,7 +10,7 @@ env: jobs: # ------------------------------------------------------------------------------------------------------------------ # - # GitLab. + # GITLAB # ------------------------------------------------------------------------------------------------------------------ # mirror_gitlab: @@ -48,7 +48,7 @@ jobs: dst_token: '${{ secrets.BOT_MIRROR_TOKEN_GITLAB }}' # ------------------------------------------------------------------------------------------------------------------ # - # Codeberg. + # CODEBERG # ------------------------------------------------------------------------------------------------------------------ # mirror_codeberg: @@ -86,45 +86,7 @@ jobs: dst_token: '${{ secrets.BOT_MIRROR_TOKEN_CODEBERG }}' # ------------------------------------------------------------------------------------------------------------------ # - # MosHub. - # ------------------------------------------------------------------------------------------------------------------ # - - mirror_moshub: - runs-on: ubuntu-latest - name: 'MosHub' - env: - DOMAIN: 'https://hub.mos.ru' - VERSION: 'v4' - NSID: '38795' - 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: Bearer ${{ secrets.BOT_MIRROR_TOKEN_MOSHUB }}' \ - -H 'Content-Type: application/json' \ - -A '${{ env.USER_AGENT }}' \ - '${{ env.DOMAIN }}/api/${{ env.VERSION }}/projects/' \ - -d '{"name":"${{ env.REPO_NAME }}","path":"${{ env.REPO_NAME }}","namespace_id":"${{ env.NSID }}","visibility":"public"}' - 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_MOSHUB }}' - - # ------------------------------------------------------------------------------------------------------------------ # - # Disroot. + # DISROOT # ------------------------------------------------------------------------------------------------------------------ # mirror_disroot: