ops: move to forgejo-primary hosting with mirror-only codeberg/github
This commit is contained in:
parent
a5bc6c5226
commit
043b1730dc
18 changed files with 336 additions and 66 deletions
|
|
@ -8,6 +8,7 @@ on:
|
|||
|
||||
jobs:
|
||||
checks:
|
||||
if: ${{ github.server_url != 'https://codeberg.org' }}
|
||||
runs-on: codeberg-medium-lazy
|
||||
steps:
|
||||
- name: Fetch source (no git required)
|
||||
|
|
@ -32,11 +33,19 @@ jobs:
|
|||
echo "error: missing GITHUB_SHA"
|
||||
exit 2
|
||||
fi
|
||||
if [[ -z "${GITHUB_SERVER_URL:-}" ]]; then
|
||||
echo "error: missing GITHUB_SERVER_URL"
|
||||
exit 2
|
||||
fi
|
||||
if [[ -z "${GITHUB_REPOSITORY:-}" ]]; then
|
||||
echo "error: missing GITHUB_REPOSITORY"
|
||||
exit 2
|
||||
fi
|
||||
|
||||
rm -rf .repo
|
||||
mkdir -p .repo
|
||||
curl -fsSL -H "Authorization: token ${GITHUB_TOKEN}" \
|
||||
"https://codeberg.org/api/v1/repos/every-channel/every.channel/archive/${GITHUB_SHA}.tar.gz?rev=${GITHUB_SHA}" \
|
||||
"${GITHUB_SERVER_URL}/api/v1/repos/${GITHUB_REPOSITORY}/archive/${GITHUB_SHA}.tar.gz?rev=${GITHUB_SHA}" \
|
||||
-o .repo/src.tgz
|
||||
tar -xzf .repo/src.tgz -C .repo --strip-components=1
|
||||
rm -f .repo/src.tgz
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue