-
Notifications
You must be signed in to change notification settings - Fork 1
56 lines (56 loc) · 2.04 KB
/
pr_build.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
---
name: Pull Request Build, Tag, & Push
on:
pull_request:
branches:
- develop
- main
- master
types:
- opened
- reopened
- synchronize
- closed
jobs:
set-platforms:
runs-on: ubuntu-latest
steps:
- name: Set platforms
id: set-platforms
run: echo "PLATFORMS=linux/amd64,linux/arm64/v8" >> $GITHUB_ENV
outputs:
platforms: ${{ env.PLATFORMS }}
build-develop-open:
if: github.base_ref == 'develop' && github.event.pull_request.merged == false
uses: kbase/.github/.github/workflows/reusable_build.yml@multi-target
with:
platforms: "linux/amd64,linux/arm64/v8"
secrets: inherit
build-develop-merge:
if: github.base_ref == 'develop' && github.event.pull_request.merged == true
uses: kbase/.github/.github/workflows/reusable_build-push.yml@multi-target
with:
name: '${{ github.event.repository.name }}-develop'
tags: pr-${{ github.event.number }},latest
platforms: "linux/amd64,linux/arm64/v8"
secrets: inherit
build-main-open:
if: (github.base_ref == 'main' || github.base_ref == 'master') && github.event.pull_request.merged == false
uses: kbase/.github/.github/workflows/reusable_build-push.yml@multi-target
with:
name: '${{ github.event.repository.name }}'
tags: pr-${{ github.event.number }}
platforms: "linux/amd64,linux/arm64/v8"
secrets: inherit
build-main-merge:
if: (github.base_ref == 'main' || github.base_ref == 'master') && github.event.pull_request.merged == true
uses: kbase/.github/.github/workflows/reusable_build-push.yml@multi-target
with:
name: '${{ github.event.repository.name }}'
tags: pr-${{ github.event.number }},latest-rc
platforms: "linux/amd64,linux/arm64/v8"
secrets: inherit
trivy-scans:
if: (github.base_ref == 'develop' || github.base_ref == 'main' || github.base_ref == 'master' ) && github.event.pull_request.merged == false
uses: kbase/.github/.github/workflows/reusable_trivy-scans.yml@multi-target
secrets: inherit