-
Notifications
You must be signed in to change notification settings - Fork 16
41 lines (38 loc) · 1.11 KB
/
ci.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
name: CI/CD
on:
pull_request:
types: [ opened, synchronize ]
branches: [ main ]
push:
branches: [ main ]
jobs:
prepare:
runs-on: ubuntu-latest
outputs:
re_image: ${{ steps.create-inputs.outputs.re_image }}
re_dockerfile: ${{ steps.create-inputs.outputs.re_dockerfile }}
do_build: ${{ steps.create-inputs.outputs.do_build }}
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 2
- name: Get changed files
id: changed-files
uses: tj-actions/changed-files@v40
with:
json: true
quotepath: false
- name: Create inputs
id: create-inputs
run: |
CHANGED_FILES='${{ steps.changed-files.outputs.all_changed_files }}' python .github/scripts/create_inputs.py
build:
needs: prepare
if: needs.prepare.outputs.do_build == 'true'
uses: ./.github/workflows/template_build_deploy.yml
secrets: inherit
with:
image: ${{ needs.prepare.outputs.re_image }}
dockerfile: ${{ needs.prepare.outputs.re_dockerfile }}
refresh: true