Alist Mirror: Initial Repo
This commit is contained in:
commit
d4c5352b75
|
|
@ -0,0 +1,56 @@
|
|||
name: Build Alist
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
schedule:
|
||||
- cron: '0 0 * * 0'
|
||||
|
||||
jobs:
|
||||
docker-build:
|
||||
runs-on: ubuntu-latest
|
||||
timeout-minutes: 5
|
||||
permissions:
|
||||
packages: write
|
||||
steps:
|
||||
|
||||
- name: Pull xhofe/alist & xhofe/alist-aria2
|
||||
run: |
|
||||
docker pull xhofe/alist:latest; docker pull xhofe/alist-aria2:latest
|
||||
docker tag xhofe/alist:latest boxinaclosedbox/alist:latest
|
||||
docker tag xhofe/alist:latest ghcr.io/boxinaclosedbox/alist:latest
|
||||
docker tag xhofe/alist-aria2:latest boxinaclosedbox/alist:latest-aria2
|
||||
docker tag xhofe/alist-aria2:latest ghcr.io/boxinaclosedbox/alist:latest-aria2
|
||||
|
||||
- name: Login to Docker Hub
|
||||
uses: docker/login-action@v2
|
||||
with:
|
||||
username: ${{ secrets.DOCKERHUB_USERNAME }}
|
||||
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
||||
|
||||
- name: Login to GitHub Container Registry
|
||||
uses: docker/login-action@v2
|
||||
with:
|
||||
registry: ghcr.io
|
||||
username: ${{ github.repository_owner }}
|
||||
password: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
- name: Push Images
|
||||
run: |
|
||||
docker push boxinaclosedbox/alist:latest
|
||||
docker push ghcr.io/boxinaclosedbox/alist:latest
|
||||
docker push boxinaclosedbox/alist:latest-aria2
|
||||
docker push ghcr.io/boxinaclosedbox/alist:latest-aria2
|
||||
docker logout
|
||||
|
||||
- name: Login to Docker Hub
|
||||
uses: docker/login-action@v2
|
||||
with:
|
||||
username: ${{ secrets.DOCKERHUB_USERNAME_2 }}
|
||||
password: ${{ secrets.DOCKERHUB_TOKEN_2 }}
|
||||
|
||||
- name: Push to alternate account
|
||||
run: |
|
||||
docker tag xhofe/alist:latest ${{ secrets.DOCKERHUB_USERNAME_2 }}/${{ secrets.NEW_IMAGE_NAME }}:latest
|
||||
docker tag xhofe/alist-aria2:latest ${{ secrets.DOCKERHUB_USERNAME_2 }}/${{ secrets.NEW_IMAGE_NAME }}:latest-aria2
|
||||
docker push ${{ secrets.DOCKERHUB_USERNAME_2 }}/${{ secrets.NEW_IMAGE_NAME }}:latest
|
||||
docker push ${{ secrets.DOCKERHUB_USERNAME_2 }}/${{ secrets.NEW_IMAGE_NAME }}:latest-aria2
|
||||
|
|
@ -0,0 +1,27 @@
|
|||
name: Keep Actions Alive
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
schedule:
|
||||
- cron: '2 1 2 * *'
|
||||
jobs:
|
||||
KeepAlive:
|
||||
runs-on: ubuntu-latest
|
||||
permissions:
|
||||
contents: write
|
||||
steps:
|
||||
- name: Checkouts
|
||||
uses: actions/checkout@v3
|
||||
|
||||
- name: Commit to 'keepalive' branch
|
||||
run: |
|
||||
REPO_URL=$(git config --get remote.origin.url) ; REPO_BASE=$(echo "${REPO_URL}" |sed 's/.*\/\///g') ; USERNAME=$(echo $REPO_BASE |sed 's/\/.*//g') ; GITHUB_TOKEN=${{secrets.GITHUB_TOKEN}}
|
||||
if [ "${GITHUB_EMAIL}" = "" ]; then GITHUB_EMAIL=boxinaclosedbox@gmail.com ; fi ; git config --global user.email "${GITHUB_EMAIL}"
|
||||
if [ "${GITHUB_USERNAME}" = "" ]; then GITHUB_USERNAME="Box In A Box" ; fi ; git config --global user.name "${GITHUB_USERNAME}"
|
||||
rm -rf * .git .github
|
||||
echo "${RANDOM}${RANDOM}${RANDOM}${RANDOM}${RANDOM}" >> Random.txt
|
||||
git init ; git add Random.txt
|
||||
git commit -m "KeepALive As of \"$(date)\""
|
||||
git remote add origin https://"{USERNAME}":"${GITHUB_TOKEN}"@"${REPO_BASE}"
|
||||
git checkout -b keepalive
|
||||
git push --set-upstream origin keepalive -f
|
||||
Loading…
Reference in New Issue