Skip to content

Commit

Permalink
Multiple workflow changes (#158)
Browse files Browse the repository at this point in the history
* Add security workflows

* Simplify CI

* Add .DS_Store to .gitignore
  • Loading branch information
zliang-akamai authored Jan 10, 2025
1 parent f71d91f commit 31e4e10
Show file tree
Hide file tree
Showing 4 changed files with 64 additions and 20 deletions.
24 changes: 4 additions & 20 deletions .github/workflows/build-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,32 +11,16 @@ on:

jobs:
build:
strategy:
matrix:
go-version: ["stable", "oldstable"]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- uses: actions/setup-go@v5
with:
go-version: "stable"

- run: go version

- name: Build binary
run: make

- name: Test
run: make test

old-go-build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- uses: actions/setup-go@v5
with:
go-version: "oldstable"

- run: go version
go-version: ${{ matrix.go-version }}

- name: Build binary
run: make
Expand Down
39 changes: 39 additions & 0 deletions .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
name: "CodeQL Advanced"

on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
schedule:
- cron: '0 13 * * 5'

jobs:
analyze:
name: Analyze (${{ matrix.language }})
runs-on: ubuntu-latest
permissions:
security-events: write

strategy:
fail-fast: false
matrix:
include:
- language: go
build-mode: autobuild

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

- name: Initialize CodeQL
uses: github/codeql-action/init@v3
with:
languages: ${{ matrix.language }}
build-mode: ${{ matrix.build-mode }}
queries: security-and-quality

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v3
with:
category: "/language:${{matrix.language}}"
19 changes: 19 additions & 0 deletions .github/workflows/dependency-review.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
name: 'Dependency review'
on:
pull_request:
branches: [ "main" ]

permissions:
contents: read
pull-requests: write

jobs:
dependency-review:
runs-on: ubuntu-latest
steps:
- name: 'Checkout repository'
uses: actions/checkout@v4
- name: 'Dependency Review'
uses: actions/dependency-review-action@v4
with:
comment-summary-in-pr: on-failure
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -30,3 +30,5 @@ dist
out

dist/

.DS_Store

0 comments on commit 31e4e10

Please sign in to comment.