1
0
mirror of https://github.com/goreleaser/goreleaser.git synced 2025-01-10 03:47:03 +02:00
goreleaser/.github/workflows/gitleaks.yml
Carlos Alexandro Becker 445f2e730d
chore: avoid running actions when not needed/possible (#3389)
- only run the build action when actual go files changed
- only run some actions on the main fork to avoid errors
2022-09-19 23:48:20 -03:00

25 lines
530 B
YAML

name: gitleaks
on:
push:
branches: ['main']
tags: ['v*']
pull_request:
permissions:
contents: read
jobs:
gitleaks:
runs-on: ubuntu-latest
if: github.event.pull_request.head.repo.full_name == github.repository
steps:
- uses: actions/checkout@2541b1294d2704b0964813337f33b291d3f8596b # v3
with:
fetch-depth: 0
- uses: gitleaks/gitleaks-action@v2
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GITLEAKS_LICENSE: ${{ secrets.GITLEAKS_LICENSE}}