Skip to content

Commit 682d456

Browse files
authored
Merge pull request #119 from git-for-windows/fix-breaking-the-pacman-lease
Fix breaking the Pacman lease
2 parents d2bdfe8 + 77573ee commit 682d456

File tree

1 file changed

+9
-23
lines changed

1 file changed

+9
-23
lines changed
Lines changed: 9 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,36 +1,22 @@
1-
name: break-pacman-upload-lease
2-
run-name: Break pacman upload lease
1+
name: Break Pacman Upload Lease
32

43
on:
54
workflow_dispatch:
65

76
jobs:
87
break-lease:
9-
if: github.event.repository.owner.login == 'git-for-windows'
8+
if: github.event.repository.fork == false
109
runs-on: ubuntu-latest
1110
steps:
1211
- name: Clone build-extra
13-
shell: bash
14-
run: git clone --depth 1 --single-branch -b main https://github.com/git-for-windows/build-extra /usr/src/build-extra
15-
16-
- name: Prepare home directory
17-
if: env.AZURE_BLOBS_TOKEN != ''
18-
env:
19-
AZURE_BLOBS_TOKEN: ${{secrets.AZURE_BLOBS_TOKEN}}
20-
shell: bash
21-
run: |
22-
echo "::add-mask::$(echo "$AZURE_BLOBS_TOKEN" | base64 -w 0)" &&
23-
echo "$AZURE_BLOBS_TOKEN" >"$HOME"/.azure-blobs-token
24-
12+
uses: actions/checkout@v4
13+
with:
14+
repository: git-for-windows/build-extra
2515
- name: Break the lease
26-
if: env.AZURE_BLOBS_TOKEN != ''
16+
if: env.azure_blobs_token != ''
2717
shell: bash
2818
env:
29-
AZURE_BLOBS_TOKEN: ${{secrets.AZURE_BLOBS_TOKEN}}
30-
run: /usr/src/build-extra/pacman-helper.sh break_lock
31-
32-
- name: Clean up temporary files
33-
if: always()
34-
shell: bash
19+
azure_blobs_token: ${{secrets.AZURE_BLOBS_TOKEN}}
3520
run: |
36-
{ rm -rf "$HOME" || echo "Gracefully leaving files undeleted" >&2; }
21+
echo "::add-mask::$(echo "$AZURE_BLOBS_TOKEN" | base64 -w 0)" &&
22+
./pacman-helper.sh break_lock

0 commit comments

Comments
 (0)