Skip to content

Commit 10885ee

Browse files
committed
drop-pacman-package: allow to uninstall MINGW packages
These have variable package name prefixes; Now, `mingw-w64-` is replaced with the SDK-specific `${MINGW_PACKAGE_PREFIX}` (e.g. `mingw-w64-clang-aarch64-` for CLANGARM64). Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
1 parent eb9a2ca commit 10885ee

1 file changed

Lines changed: 17 additions & 6 deletions

File tree

.github/workflows/drop-pacman-package.yml

Lines changed: 17 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -23,22 +23,33 @@ jobs:
2323
drop-pacman-package:
2424
strategy:
2525
matrix:
26-
sdk: [git-sdk-64, git-sdk-arm64, git-sdk-32]
27-
runs-on: ${{ matrix.sdk == 'git-sdk-arm64' && 'windows-11-arm' || 'windows-latest' }}
26+
sdk:
27+
- name: git-sdk-64
28+
mingw-package-prefix: mingw-w64-x86_64
29+
- name: git-sdk-arm64
30+
mingw-package-prefix: mingw-w64-clang-aarch64
31+
- name: git-sdk-32
32+
mingw-package-prefix: mingw-w64-i686
33+
runs-on: ${{ matrix.sdk.name == 'git-sdk-arm64' && 'windows-11-arm' || 'windows-latest' }}
2834
steps:
35+
- name: Special-case MINGW packages
36+
if: startsWith(env.PACKAGE, 'mingw-w64-')
37+
shell: bash
38+
run:
39+
echo "PACKAGE=${{ matrix.sdk.mingw-package-prefix }}-${PACKAGE#mingw-w64-}" >>$GITHUB_ENV
2940
- name: obtain installation access token
3041
uses: actions/create-github-app-token@v3
3142
id: sdk-repo-token
3243
with:
3344
app-id: ${{ secrets.GH_APP_ID }}
3445
private-key: ${{ secrets.GH_APP_PRIVATE_KEY }}
3546
owner: ${{ github.repository_owner }}
36-
repositories: ${{ matrix.sdk }}
37-
- name: clone ${{ matrix.sdk }}
47+
repositories: ${{ matrix.sdk.name }}
48+
- name: clone ${{ matrix.sdk.name }}
3849
uses: actions/checkout@v6
3950
with:
4051
persist-credentials: true
41-
repository: ${{ github.repository_owner }}/${{ matrix.sdk }}
52+
repository: ${{ github.repository_owner }}/${{ matrix.sdk.name }}
4253
token: ${{ steps.sdk-repo-token.outputs.token }}
4354
- name: use the SDK's Bash and git.exe
4455
run: "usr\\bin\\bash.exe -lc 'cygpath -aw /usr/bin >>$GITHUB_PATH && cygpath -aw /cmd >>$GITHUB_PATH'"
@@ -64,7 +75,7 @@ jobs:
6475
git switch -c "$branch" &&
6576
git add -A . &&
6677
if git diff --cached --quiet; then
67-
echo "::warning::${{ matrix.sdk }}: no changes to commit!"
78+
echo "::warning::${{ matrix.sdk.name }}: no changes to commit!"
6879
exit 0
6980
fi &&
7081
commit_message="Drop package '$PACKAGE'

0 commit comments

Comments
 (0)