-
Notifications
You must be signed in to change notification settings - Fork 82
42 lines (37 loc) · 1.01 KB
/
cicd-pipeline.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
name: "CI/CD Pipeline"
on:
push:
branches:
- master
pull_request_target:
types:
- opened
- synchronize
- reopened
- ready_for_review
branches:
- master
concurrency:
group: CI/CD Pipeline-${{ github.event.pull_request.number || github.event.pull_request.head.ref || github.ref_name }}
cancel-in-progress: true
jobs:
build:
name: "Build"
uses: ./.github/workflows/docker-build.yml
permissions:
contents: read
checks: write
with:
sha: ${{ github.event.pull_request.head.sha || github.event.after }}
branch_name: ${{ github.event.pull_request.head.ref || github.ref_name }}
secrets: inherit
deploy:
name: "Deploy"
if: github.event_name == 'pull_request_target'
uses: ./.github/workflows/argocd-create-app.yml
needs:
- build
with:
docker_image_version: ${{ needs.build.outputs.image_version }}
branch_name: ${{ github.event.pull_request.head.ref || github.ref_name }}
secrets: inherit