-
Notifications
You must be signed in to change notification settings - Fork 3
51 lines (48 loc) · 1.3 KB
/
pr-merged.yaml
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
name: pr-merged
permissions: read-all
on:
pull_request_target:
types: [closed]
branches:
- 'main'
paths-ignore:
- '*.md'
- '*.yaml'
- '.github/workflows/*'
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
reset-run-number:
runs-on: ubuntu-latest
name: reset github.run_number
outputs:
run-number: ${{ steps.get-build.outputs.build-number }}
steps:
- name: Get build number
id: get-build
uses: mlilback/build-number@v1
with:
base: -149
run-id: ${{ github.run_number }}
pr-merged:
if: ${{ github.event.pull_request.merged == true }} ## Skip if not merged
needs: reset-run-number
permissions:
id-token: write
packages: write
contents: write
pull-requests: read
uses: kubescape/workflows/.github/workflows/incluster-comp-pr-merged.yaml@main
with:
IMAGE_NAME: quay.io/${{ github.repository_owner }}/prometheus-exporter
IMAGE_TAG: v0.0.${{ needs.reset-run-number.outputs.run-number }}
COMPONENT_NAME: prometheus-exporter
CGO_ENABLED: 0
GO111MODULE: "on"
BUILD_PLATFORM: linux/amd64,linux/arm64
GO_VERSION: "1.23"
REQUIRED_TESTS: '[]'
COSIGN: true
HELM_E2E_TEST: true
secrets: inherit