Skip to content

Commit

Permalink
build(actions): set timeout and permissions
Browse files Browse the repository at this point in the history
Signed-off-by: nscuro <nscuro@protonmail.com>
  • Loading branch information
nscuro committed Apr 11, 2022
1 parent f09aa68 commit 402796a
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 16 deletions.
8 changes: 6 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,14 @@ on:
- main
paths-ignore:
- examples/**
schedule:
- cron: 0 0 * * *

permissions:
contents: read

jobs:
licensecheck:
name: License Check
timeout-minutes: 5
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
Expand All @@ -28,6 +30,7 @@ jobs:

lint:
name: Lint
timeout-minutes: 5
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
Expand All @@ -44,6 +47,7 @@ jobs:

test:
name: Test
timeout-minutes: 5
runs-on: ubuntu-latest
steps:
- name: Setup Go
Expand Down
20 changes: 7 additions & 13 deletions .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
@@ -1,35 +1,29 @@
name: "CodeQL"
name: CodeQL

on:
push:
branches:
- main
- main
pull_request:
branches:
- main
schedule:
- cron: '39 15 * * 5'
- main

permissions:
security-events: write

jobs:
analyze:
name: Analyze
timeout-minutes: 10
runs-on: ubuntu-latest
permissions:
actions: read
contents: read
security-events: write

steps:
- name: Checkout repository
uses: actions/checkout@v3

- name: Initialize CodeQL
uses: github/codeql-action/init@v1
with:
languages: "go"

- name: Autobuild
uses: github/codeql-action/autobuild@v1

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v1
4 changes: 4 additions & 0 deletions .github/workflows/goreleaser-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,13 @@ on:
branches:
- main

permissions:
contents: read

jobs:
goreleaser-ci:
name: Test
timeout-minutes: 10
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
Expand Down
7 changes: 6 additions & 1 deletion .github/workflows/goreleaser.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,17 @@
name: goreleaser
name: GoReleaser

on:
push:
tags:
- 'v*'

permissions:
contents: write

jobs:
goreleaser:
name: Release
timeout-minutes: 10
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
Expand Down

0 comments on commit 402796a

Please sign in to comment.