Skip to content

Commit 51ebcc1

Browse files
authored
Merge pull request #86 from rimrul/break-lease
Add a workflow to break a pacman upload lease
2 parents a44ef11 + 36f0217 commit 51ebcc1

File tree

1 file changed

+35
-0
lines changed

1 file changed

+35
-0
lines changed
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
name: break-pacman-upload-lease
2+
run-name: Break pacman upload lease
3+
4+
on:
5+
workflow_dispatch:
6+
7+
jobs:
8+
break-lease:
9+
runs-on: ubuntu-latest
10+
steps:
11+
- name: Clone build-extra
12+
shell: bash
13+
run: git clone --depth 1 --single-branch -b main https://github.com/git-for-windows/build-extra /usr/src/build-extra
14+
15+
- name: Prepare home directory
16+
if: env.AZURE_BLOBS_TOKEN != ''
17+
env:
18+
AZURE_BLOBS_TOKEN: ${{secrets.AZURE_BLOBS_TOKEN}}
19+
shell: bash
20+
run: |
21+
echo "::add-mask::$(echo "$AZURE_BLOBS_TOKEN" | base64 -w 0)" &&
22+
echo "$AZURE_BLOBS_TOKEN" >"$HOME"/.azure-blobs-token
23+
24+
- name: Break the lease
25+
if: env.AZURE_BLOBS_TOKEN != ''
26+
shell: bash
27+
env:
28+
AZURE_BLOBS_TOKEN: ${{secrets.AZURE_BLOBS_TOKEN}}
29+
run: /usr/src/build-extra/pacman-helper.sh break_lock
30+
31+
- name: Clean up temporary files
32+
if: always()
33+
shell: bash
34+
run: |
35+
{ rm -rf "$HOME" || echo "Gracefully leaving files undeleted" >&2; }

0 commit comments

Comments
 (0)