mirror.yml

set or add url for repo
list tmpfs
This commit is contained in:
sidey79 2022-09-05 22:09:16 +02:00
parent a836a5f310
commit 28158b6301
1 changed files with 9 additions and 5 deletions

View File

@ -44,8 +44,8 @@ jobs:
- name: create tmpfs for svn repo
run: |
mkdir -p ./src/fhem-mirror/
sudo mount -t tmpfs -o size=3G tmpfs ./src/fhem-mirror/
mkdir -p ./src/fhem-mirror
sudo mount -t tmpfs -o size=3G tmpfs ./src/fhem-mirror
- name: Cache runners svn-2-git-fhem mirror directory
# Some room for improvement because we create a new cache on every run where a new ref is fetched, this isn't very nice, normaly weneed only the last one and it takes 7 days until they are deleted
@ -56,8 +56,12 @@ jobs:
key: ${{ runner.os }}-fhemsvndir-${{ steps.get-date.outputs.timestamp }}
restore-keys: |
${{ runner.os }}-fhemsvndir-
- name: clean cache
- name: list filesystem
run: |
df -h ./src/fhem-mirror
- name: clean cache
env:
Clean_Cache: ${{ secrets.CLEANCACHE }}
if: "${{ env.Clean_Cache == 'true' }}"
@ -132,7 +136,7 @@ jobs:
if: ${{ steps.fetchsvn.outputs.SVN_FETCH_STATUS == 'complete' }}
working-directory: ./src/fhem-mirror
run: |
git remote add origin https://x-access-token:${{ secrets.GITHUB_TOKEN }}@github.com/${{ github.repository }}
git remote set-url origin https://x-access-token:${{ secrets.GITHUB_TOKEN }}@github.com/${{ github.repository }} || git remote add origin https://x-access-token:${{ secrets.GITHUB_TOKEN }}@github.com/${{ github.repository }}
git fetch --unshallow || true
git push origin master --force --tags