Skip to content

Commit

Permalink
Merge pull request #17 from kubescape/fixci
Browse files Browse the repository at this point in the history
fix CI
  • Loading branch information
matthyx committed Jun 24, 2024
2 parents 19f44f1 + d8739fa commit 3584508
Show file tree
Hide file tree
Showing 4 changed files with 31 additions and 17 deletions.
3 changes: 2 additions & 1 deletion .github/ISSUE_TEMPLATE/feature_request.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,5 @@ assignees: ''
<!-- A clear and concise description of any alternative solutions or features you've considered. -->

## Additional context
<!-- Add any other context or screenshots about the feature request here. -->
<!-- Add any other context or screenshots about the feature request here. -->

9 changes: 2 additions & 7 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,4 @@
## Overview
This PR fixes #

<!-- **[Signed Commits](../CONTRIBUTING.md#sign-off-per-commit)** -->
**Signed Commits**
- [ ] Yes, I signed my commits.

<!-- Please provide a brief overview of the changes made in this pull request. e.g. current behavior/future behavior -->

<!--
Expand Down Expand Up @@ -49,4 +43,5 @@ put an [x] in the box to get it checked
**Please open the PR against the `dev` branch (Unless the PR contains only documentation changes)**
-->
-->

5 changes: 2 additions & 3 deletions .github/workflows/pr-created.yaml
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
name: pull_request_created
permissions: read-all
on:
pull_request:
types: [opened, reopened, synchronize, ready_for_review]
branches:
- 'main'
paths-ignore:
- '*.md'
- '*.yaml'
Expand All @@ -20,6 +19,6 @@ jobs:
security-events: write
uses: kubescape/workflows/.github/workflows/incluster-comp-pr-created.yaml@main
with:
GO_VERSION: "1.22"
CGO_ENABLED: 0
GO_VERSION: "1.22"
secrets: inherit
31 changes: 25 additions & 6 deletions .github/workflows/pr-merged.yaml
Original file line number Diff line number Diff line change
@@ -1,26 +1,45 @@
name: pr-merged
permissions: read-all
on:
pull_request_target:
types: [closed]
branches:
- 'main'
paths-ignore:
- '**.md' ### Ignore running when README.MD changed.
- '**.yaml' ### Ignore running when YAML files changed.
- '.github/workflows/*' ### Ignore running when files under path: .github/workflows/* changed.
- '*.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 }}
if: ${{ github.event.pull_request.merged == true }} ## Skip if not merged
needs: reset-run-number
permissions:
id-token: write
packages: write
contents: read
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.${{ github.run_number }}
IMAGE_TAG: v0.0.${{ needs.reset-run-number.outputs.run-number }}
COMPONENT_NAME: prometheus-exporter
CGO_ENABLED: 0
GO111MODULE: "on"
Expand Down

0 comments on commit 3584508

Please sign in to comment.