Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 24 additions & 8 deletions .github/workflows/drop-pacman-package.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
name: Drop Pacman package from SDKs
name: Drop (uninstall) Pacman package from SDKs
run-name: Drop (uninstall) Pacman package ${{ inputs.package }} from SDKs

on:
workflow_dispatch:
Expand All @@ -22,23 +23,38 @@ jobs:
drop-pacman-package:
strategy:
matrix:
sdk: [git-sdk-64, git-sdk-arm64, git-sdk-32]
runs-on: ${{ matrix.sdk == 'git-sdk-arm64' && 'windows-11-arm' || 'windows-latest' }}
sdk:
- name: git-sdk-64
mingw-package-prefix: mingw-w64-x86_64
- name: git-sdk-64
ref: ucrt64
mingw-package-prefix: mingw-w64-ucrt-x86_64
- name: git-sdk-arm64
mingw-package-prefix: mingw-w64-clang-aarch64
- name: git-sdk-32
mingw-package-prefix: mingw-w64-i686
runs-on: ${{ matrix.sdk.name == 'git-sdk-arm64' && 'windows-11-arm' || 'windows-latest' }}
steps:
- name: Special-case MINGW packages
if: startsWith(env.PACKAGE, 'mingw-w64-')
shell: bash
run:
echo "PACKAGE=${{ matrix.sdk.mingw-package-prefix }}-${PACKAGE#mingw-w64-}" >>$GITHUB_ENV
- name: obtain installation access token
uses: actions/create-github-app-token@v3
id: sdk-repo-token
with:
app-id: ${{ secrets.GH_APP_ID }}
private-key: ${{ secrets.GH_APP_PRIVATE_KEY }}
owner: ${{ github.repository_owner }}
repositories: ${{ matrix.sdk }}
- name: clone ${{ matrix.sdk }}
repositories: ${{ matrix.sdk.name }}
- name: clone ${{ matrix.sdk.name }}
uses: actions/checkout@v6
with:
persist-credentials: true
repository: ${{ github.repository_owner }}/${{ matrix.sdk }}
repository: ${{ github.repository_owner }}/${{ matrix.sdk.name }}
token: ${{ steps.sdk-repo-token.outputs.token }}
ref: ${{ matrix.sdk.ref }}
- name: use the SDK's Bash and git.exe
run: "usr\\bin\\bash.exe -lc 'cygpath -aw /usr/bin >>$GITHUB_PATH && cygpath -aw /cmd >>$GITHUB_PATH'"
- name: Remove ${{ env.PACKAGE }}
Expand All @@ -63,7 +79,7 @@ jobs:
git switch -c "$branch" &&
git add -A . &&
if git diff --cached --quiet; then
echo "::warning::${{ matrix.sdk }}: no changes to commit!"
echo "::warning::${{ matrix.sdk.name }}: no changes to commit!"
exit 0
fi &&
commit_message="Drop package '$PACKAGE'
Expand All @@ -81,7 +97,7 @@ jobs:
gh pr create \
--fill \
--head "$branch" \
--base main 2>&1;
--base ${{ matrix.sdk.ref || 'main' }} 2>&1;
echo $? >/tmp/exit.status
) |
tee -a /tmp/pr-create-output.txt &&
Expand Down
Loading