File tree Expand file tree Collapse file tree 4 files changed +45
-1
lines changed Expand file tree Collapse file tree 4 files changed +45
-1
lines changed Original file line number Diff line number Diff line change
1
+ name : " GitHub: Delete Branch"
2
+
3
+ on :
4
+ workflow_call :
5
+
6
+ jobs :
7
+ az-acr-delete :
8
+ name : ' Azure: Delete Branch Images'
9
+ runs-on : ubuntu-latest
10
+ environment : dev
11
+ env :
12
+ AZURE_CONTAINER_REGISTRY : ${{ vars.AZURE_CONTAINER_REGISTRY }}
13
+ ACR_LOGIN_USERNAME : ${{ secrets.ACR_LOGIN_USERNAME }}
14
+ ACR_LOGIN_PASSWORD : ${{ secrets.ACR_LOGIN_PASSWORD }}
15
+ strategy :
16
+ matrix :
17
+ platform : [amd64, arm64]
18
+ steps :
19
+ - name : Azure Cloud Login
20
+ uses : Azure/login@v2
21
+ with :
22
+ client-id : ${{ secrets.AZURE_CLIENT_ID }}
23
+ tenant-id : ${{ secrets.AZURE_TENANT_ID }}
24
+ subscription-id : ${{ secrets.AZURE_SUBSCRIPTION_ID }}
25
+
26
+ - name : Delete Branch Container Image
27
+ uses : azure/cli@v2
28
+ with :
29
+ inlineScript : |
30
+ az acr repository delete \
31
+ --name ${{ env.AZURE_CONTAINER_REGISTRY }} \
32
+ --image ${{ github.event.repository.name }}:${{ matrix.platform}}-${{ github.ref_name }} \
33
+ --yes
34
+
35
+ gh-delete-branch :
36
+ name : ' GitHub: Delete Branch'
37
+ runs-on : ubuntu-latest
38
+ steps :
39
+ - name : Checkout repository
40
+ uses : actions/checkout@v4
41
+
42
+ - name : Delete Branch
43
+ shell : bash
44
+ run : git push origin --delete ${{ github.ref }}
Original file line number Diff line number Diff line change 4
4
workflow_call :
5
5
6
6
jobs :
7
- validate-release :
7
+ gh- validate-release :
8
8
name : ' GitHub: Validate Release'
9
9
runs-on : ubuntu-latest
10
10
steps :
You can’t perform that action at this time.
0 commit comments