Skip to content

Commit 862615c

Browse files
Refactor snapshot job for user and archive handling
Updated GitHub Actions workflow to use dynamic user and archive naming.
1 parent 43a6f30 commit 862615c

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

.github/workflows/main.yml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ on:
66
- cron: '0 0 1 * *' # Runs at 00:00 UTC on the 1st of every month
77

88
env:
9+
user: FalsePhilosopher
910
repo: badusb
1011

1112
jobs:
@@ -61,10 +62,11 @@ jobs:
6162
body: |
6263
Automated snapshot for ${{ steps.date.outputs.date }}.
6364
```
64-
gh release download -p '${{ env.repo }}-*.tzst.*' -R FalsePhilosopher/${{ env.repo }}
65-
cat ${{ env.repo }}-*.tzst.* > ${{ env.repo }}.tzst
65+
gh release download -p '${{ env.repo }}-*.tzst.*' -R ${{ env.user }}/${{ env.repo }}
66+
arc=$(ls ${{ env.repo }}-*.tzst.* | head -n 1 | sed 's/\.[^.]*$//')
67+
cat ${{ env.repo }}-*.tzst.* > "$arc"
6668
rm ${{ env.repo }}-*.tzst.*
67-
ratarmount ${{ env.repo }}.tzst
69+
ratarmount "$arc"
6870
```
6971
files: |
7072
${{ steps.check_size.outputs.split == 'true' && format('{0}-{1}.tzst.*', env.repo, steps.date.outputs.date) || format('{0}-{1}.tzst', env.repo, steps.date.outputs.date) }}

0 commit comments

Comments
 (0)