Skip to content

Commit e5bad38

Browse files
authored
Update mirror-snapshot.yml to allow mirrorng msys db
1 parent 4f6d39b commit e5bad38

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

.github/workflows/mirror-snapshot.yml

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,9 @@ on:
1111
newrelease:
1212
type: text
1313
required: true
14+
msysarch:
15+
type: text
16+
required: false
1417
jobs:
1518
mirror:
1619
runs-on: ubuntu-latest
@@ -29,6 +32,7 @@ jobs:
2932
SNAPSHOTRELEASE: ${{ inputs.snapshotrelease }}
3033
REPONAME: ${{ inputs.reponame }}
3134
NEWRELEASE: ${{ inputs.newrelease }}
35+
MSYSARCH: ${{ inputs.msysarch }}
3236
run: |
3337
python -m venv --system-site-packages .venv
3438
. .venv/bin/activate
@@ -39,7 +43,12 @@ jobs:
3943
curl -LO "https://github.com/${{ github.repository }}/releases/download/${SNAPSHOTRELEASE}/${REPONAME}.db${sig}"
4044
done
4145
popd
42-
python pacdb/examples/pacmirror_rsync.py -e "${REPONAME}" -n -v "rsync://repo.msys2.org/builds/mingw/${REPONAME}" "${NEWRELEASE}"
46+
if [[ -n "${MSYSARCH}" ]]; then
47+
subdir="msys/${MSYSARCH}"
48+
else
49+
subdir="mingw"
50+
fi
51+
python pacdb/examples/pacmirror_rsync.py -e "${REPONAME}" -n -v "rsync://repo.msys2.org/builds/${subdir}/${REPONAME}" "${NEWRELEASE}"
4352
# work around github issue with ~ in file name (turns into .)
4453
for a in "${NEWRELEASE}/"*~*; do
4554
mv "$a" "${a//\~/.}"

0 commit comments

Comments
 (0)