-
Notifications
You must be signed in to change notification settings - Fork 0
59 lines (51 loc) · 1.69 KB
/
on_push_merge_checks.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
53
54
55
56
57
58
59
name: Merge
on:
push:
branches:
- main
jobs:
# --- Image Names ---
branch-and-last-commit:
name: Merged Branch and Last Commit
uses: ./.github/workflows/get_merged_branch_last_commit.yml
merged-image-names:
name: Merged (Branch) Image Names
needs:
- branch-and-last-commit
uses: ./.github/workflows/image_names.yml
with:
add_branch_name: true
branch_name: ${{ needs.branch-and-last-commit.outputs.branch }}
tag: ${{ needs.branch-and-last-commit.outputs.commit }}
production-image-names:
name: Production Image Names
needs:
- branch-and-last-commit
uses: ./.github/workflows/image_names.yml
with:
tag: ${{ needs.branch-and-last-commit.outputs.commit }}
# --- Promote Production Images ---
# Promote Deployment Image
promote-merged-deploy-image:
name: Promote Merged Deployment Image to Production
needs:
- merged-image-names
- production-image-names
uses: ./.github/workflows/copy_image.yml
with:
source_image: ${{ needs.merged-image-names.outputs.vetted_image }}
target_image: ${{ needs.production-image-names.outputs.vetted_image }}
secrets:
registry_u: ${{ secrets.DOCKER_HUB_USERNAME }}
registry_p: ${{ secrets.DOCKER_HUB_ACCESS_TOKEN }}
promote-merged-deploy-image-to-latest:
name: Promote Latest Deployment Image
needs:
- production-image-names
- promote-merged-deploy-image
uses: ./.github/workflows/copy_image_to_latest.yml
with:
image: ${{ needs.production-image-names.outputs.vetted_image }}
secrets:
registry_u: ${{ secrets.DOCKER_HUB_USERNAME }}
registry_p: ${{ secrets.DOCKER_HUB_ACCESS_TOKEN }}