Skip to content

Commit

Permalink
fix: scan on pull_request instead of push (#10)
Browse files Browse the repository at this point in the history
* fix: scan on pull_request instead of push

* chore: standardise workflow with other rocks
  • Loading branch information
gruyaume authored Apr 29, 2024
1 parent b25afb3 commit 583951f
Show file tree
Hide file tree
Showing 8 changed files with 106 additions and 72 deletions.
38 changes: 38 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
---
name: Bug report
about: Create a bug report to help us improve
title: ""
labels: ["bug"]
assignees: ''
---

#### Describe the bug
<!-- A clear and concise description of what the bug is. -->

#### To Reproduce
<!-- Steps that can be taken to reproduce the behaviour -->

1. Go to '...'
2. Click on '....'
3. Scroll down to '....'
4. See error

#### Expected behavior
<!-- A clear and concise description of what you expected to happen. -->

#### Screenshots
<!-- If applicable, add screenshots to help explain your problem. -->

#### Logs
<!-- If applicable, add logs to help explain your problem. -->

#### Environment

- ROCK version (if relevant): <!-- e.g. 1.2 -->
- Juju version (output from `juju --version`):
- Cloud Environment: <!-- e.g. GKE -->
- Kubernetes version (output from `kubectl version --short`):

#### Additional context

<!-- Add any other context about the problem here. -->
17 changes: 0 additions & 17 deletions .github/workflows/build.yaml

This file was deleted.

12 changes: 12 additions & 0 deletions .github/workflows/dependabot_pr.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
name: "Dependabot Auto Approve and Merge"

on:
pull_request:

permissions:
pull-requests: write
contents: write

jobs:
auto-merge:
uses: canonical/sdcore-github-workflows/.github/workflows/dependabot_pr.yaml@v0.0.1
11 changes: 11 additions & 0 deletions .github/workflows/issues.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
name: Sync Issues to JIRA

on:
issues:
types: [opened, reopened, closed]

jobs:
update:
name: Update Issue
uses: canonical/sdcore-github-workflows/.github/workflows/issues.yaml@v0.0.1
secrets: inherit
20 changes: 20 additions & 0 deletions .github/workflows/lint-pr.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
name: "Lint PR"

on:
pull_request_target:
types:
- opened
- edited
- synchronize

permissions:
pull-requests: read

jobs:
main:
name: Validate PR title
runs-on: ubuntu-latest
steps:
- uses: amannn/action-semantic-pull-request@v5
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
25 changes: 25 additions & 0 deletions .github/workflows/main.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: Main

on:
pull_request:
branches:
- main
push:
branches:
- main
schedule:
- cron: '0 0 * * 0'

jobs:

build-rock:
uses: canonical/sdcore-github-workflows/.github/workflows/build-rock.yaml@v0.0.1

scan-rock:
needs: build-rock
uses: canonical/sdcore-github-workflows/.github/workflows/scan-rock.yaml@v0.0.1

publish-rock:
if: github.ref_name == 'main'
needs: scan-rock
uses: canonical/sdcore-github-workflows/.github/workflows/publish-rock.yaml@v0.0.1
14 changes: 0 additions & 14 deletions .github/workflows/on_push.yaml

This file was deleted.

41 changes: 0 additions & 41 deletions .github/workflows/publish.yaml

This file was deleted.

0 comments on commit 583951f

Please # to comment.