Skip to content

Commit efecf1a

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 8f8a07d commit efecf1a

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
@@ -22,22 +22,33 @@ jobs:
2222
drop-pacman-package:
2323
strategy:
2424
matrix:
25-
sdk: [git-sdk-64, git-sdk-arm64, git-sdk-32]
26-
runs-on: ${{ matrix.sdk == 'git-sdk-arm64' && 'windows-11-arm' || 'windows-latest' }}
25+
sdk:
26+
- name: git-sdk-64
27+
mingw-package-prefix: mingw-w64-x86_64
28+
- name: git-sdk-arm64
29+
mingw-package-prefix: mingw-w64-clang-aarch64
30+
- name: git-sdk-32
31+
mingw-package-prefix: mingw-w64-i686
32+
runs-on: ${{ matrix.sdk.name == 'git-sdk-arm64' && 'windows-11-arm' || 'windows-latest' }}
2733
steps:
34+
- name: Special-case MINGW packages
35+
if: startsWith(env.PACKAGE, 'mingw-w64-')
36+
shell: bash
37+
run:
38+
echo "PACKAGE=${{ matrix.sdk.mingw-package-prefix }}-${PACKAGE#mingw-w64-}" >>$GITHUB_ENV
2839
- name: obtain installation access token
2940
uses: actions/create-github-app-token@v3
3041
id: sdk-repo-token
3142
with:
3243
app-id: ${{ secrets.GH_APP_ID }}
3344
private-key: ${{ secrets.GH_APP_PRIVATE_KEY }}
3445
owner: ${{ github.repository_owner }}
35-
repositories: ${{ matrix.sdk }}
36-
- name: clone ${{ matrix.sdk }}
46+
repositories: ${{ matrix.sdk.name }}
47+
- name: clone ${{ matrix.sdk.name }}
3748
uses: actions/checkout@v6
3849
with:
3950
persist-credentials: true
40-
repository: ${{ github.repository_owner }}/${{ matrix.sdk }}
51+
repository: ${{ github.repository_owner }}/${{ matrix.sdk.name }}
4152
token: ${{ steps.sdk-repo-token.outputs.token }}
4253
- name: use the SDK's Bash and git.exe
4354
run: "usr\\bin\\bash.exe -lc 'cygpath -aw /usr/bin >>$GITHUB_PATH && cygpath -aw /cmd >>$GITHUB_PATH'"
@@ -63,7 +74,7 @@ jobs:
6374
git switch -c "$branch" &&
6475
git add -A . &&
6576
if git diff --cached --quiet; then
66-
echo "::warning::${{ matrix.sdk }}: no changes to commit!"
77+
echo "::warning::${{ matrix.sdk.name }}: no changes to commit!"
6778
exit 0
6879
fi &&
6980
commit_message="Drop package '$PACKAGE'

0 commit comments

Comments
 (0)