rog-golang-buddies / golang-template-repository

Kickstarter repository for a golang service
Apache License 2.0
17 stars 7 forks source link

Align workflow triggers #43

Closed haani-niyaz closed 2 years ago

haani-niyaz commented 2 years ago

All workflows do not have a consistent trigger mechanism. The following workflows should have a consistent trigger and if not, should be documented via a comment on why it is different. Alignment on this would also set the defaults for future workflows we setup.

name: SonarCloud
on:
  push:
    branches:
      - main
  pull_request_target:
    types: [opened, synchronize, reopened]
...
name: Gitleaks
on: [pull_request, push, workflow_dispatch]
...
name: Go-Test
on:
  [pull_request, push, workflow_dispatch]
...
name: golangci-lint
on:
  push:
  pull_request: 
...

The following seems obvious but added here for completeness.

name: gen-docs
on:
  push:
    branches:
      - main
...
name: release
on:
  push:
    branches:
      - main
 ...