-
Notifications
You must be signed in to change notification settings - Fork 0
52 lines (44 loc) · 1.52 KB
/
dc_release.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
name: 'DC: Release'
on:
workflow_call:
# Special permissions required for OIDC authentication
permissions:
id-token: write
contents: read
actions: read
jobs:
call-gh-validate-release:
if: github.event_name == 'release'
uses: code-kern-ai/cicd-deployment-scripts/.github/workflows/gh_validate_release.yml@dev
secrets: inherit
# call-az-acr-release:
# needs: [call-gh-validate-release]
# if: always() && !failure()
# uses: code-kern-ai/cicd-deployment-scripts/.github/workflows/az_acr_release.yml@dev
# secrets: inherit
call-dc-edit:
needs: [call-gh-validate-release] # [call-az-acr-release]
if: always() && !failure() && github.event_name == 'release'
uses: code-kern-ai/cicd-deployment-scripts/.github/workflows/dc_edit.yml@dev
secrets: inherit
call-gh-release:
# needs: [call-k8-deploy]
needs: [call-dc-edit]
if: always() && github.event_name == 'release'
uses: code-kern-ai/cicd-deployment-scripts/.github/workflows/gh_release.yml@dev
secrets: inherit
with:
deployment_status: "success"
gh-delete-branch:
name: 'GitHub: Delete Branch'
runs-on: ubuntu-latest
needs: [call-dc-edit]
if: github.event_name == 'pull_request' && github.event.pull_request.merged && !failure() && !cancelled()
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
token: ${{ secrets.GH_TOKEN }}
- name: Delete Branch
shell: bash
run: git push origin --delete ${{ github.head_ref }}