aboutsummaryrefslogtreecommitdiffstats
path: root/.github/workflows
diff options
context:
space:
mode:
Diffstat (limited to '.github/workflows')
-rw-r--r--.github/workflows/cifuzz.yml35
-rw-r--r--.github/workflows/codeql.yml6
-rw-r--r--.github/workflows/git.yml10
-rw-r--r--.github/workflows/pr-validation.yml30
-rw-r--r--.github/workflows/stale-issues-bot.yaml31
-rw-r--r--.github/workflows/test.yml10
6 files changed, 109 insertions, 13 deletions
diff --git a/.github/workflows/cifuzz.yml b/.github/workflows/cifuzz.yml
new file mode 100644
index 0000000..a930876
--- /dev/null
+++ b/.github/workflows/cifuzz.yml
@@ -0,0 +1,35 @@
+name: CIFuzz
+on: [pull_request]
+permissions: {}
+jobs:
+ Fuzzing:
+ runs-on: ubuntu-latest
+ permissions:
+ security-events: write
+ steps:
+ - name: Build Fuzzers
+ id: build
+ uses: google/oss-fuzz/infra/cifuzz/actions/build_fuzzers@master
+ with:
+ oss-fuzz-project-name: 'go-git'
+ language: go
+ - name: Run Fuzzers
+ uses: google/oss-fuzz/infra/cifuzz/actions/run_fuzzers@master
+ with:
+ oss-fuzz-project-name: 'go-git'
+ language: go
+ fuzz-seconds: 300
+ output-sarif: true
+ - name: Upload Crash
+ uses: actions/upload-artifact@v4
+ if: failure() && steps.build.outcome == 'success'
+ with:
+ name: artifacts
+ path: ./out/artifacts
+ - name: Upload Sarif
+ if: always() && steps.build.outcome == 'success'
+ uses: github/codeql-action/upload-sarif@v3
+ with:
+ # Path to SARIF file relative to the root of the repository
+ sarif_file: cifuzz-sarif/results.sarif
+ checkout_path: cifuzz-sarif
diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml
index fbb867c..920fc3e 100644
--- a/.github/workflows/codeql.yml
+++ b/.github/workflows/codeql.yml
@@ -24,11 +24,11 @@ jobs:
steps:
- name: Checkout code
- uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.2
+ uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
- uses: github/codeql-action/init@29b1f65c5e92e24fe6b6647da1eaabe529cec70f # v2.3.3
+ uses: github/codeql-action/init@03e7845b7bfcd5e7fb63d1ae8c61b0e791134fab # v2.22.11
with:
languages: ${{ matrix.language }}
# xref: https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/configuring-code-scanning#using-queries-in-ql-packs
@@ -39,6 +39,6 @@ jobs:
run: go build ./...
- name: Perform CodeQL Analysis
- uses: github/codeql-action/analyze@29b1f65c5e92e24fe6b6647da1eaabe529cec70f # v2.3.3
+ uses: github/codeql-action/analyze@03e7845b7bfcd5e7fb63d1ae8c61b0e791134fab # v2.22.11
with:
category: "/language:${{matrix.language}}"
diff --git a/.github/workflows/git.yml b/.github/workflows/git.yml
index 60cfa12..6e0ebb6 100644
--- a/.github/workflows/git.yml
+++ b/.github/workflows/git.yml
@@ -16,13 +16,13 @@ jobs:
GIT_DIST_PATH: .git-dist/${{ matrix.git[0] }}
steps:
+ - name: Checkout code
+ uses: actions/checkout@v4
+
- name: Install Go
- uses: actions/setup-go@v3
+ uses: actions/setup-go@v5
with:
- go-version: 1.20.x
-
- - name: Checkout code
- uses: actions/checkout@v3
+ go-version: 1.21.x
- name: Install build dependencies
run: sudo apt-get update && sudo apt-get install gettext libcurl4-openssl-dev
diff --git a/.github/workflows/pr-validation.yml b/.github/workflows/pr-validation.yml
new file mode 100644
index 0000000..d7b1150
--- /dev/null
+++ b/.github/workflows/pr-validation.yml
@@ -0,0 +1,30 @@
+name: 'PR Validation'
+
+on:
+ pull_request:
+ types:
+ - opened
+ - edited
+ - reopened
+ - synchronize
+
+permissions:
+ contents: read
+
+jobs:
+ check-commit-message:
+ name: Check Commit Messages
+ runs-on: ubuntu-latest
+ steps:
+ - name: Check Package Prefix
+ uses: gsactions/commit-message-checker@v2
+ with:
+ pattern: '^(\*|git|plumbing|utils|config|_examples|internal|storage|cli|build): .+'
+ error: |
+ Commit message(s) does not align with contribution acceptance criteria.
+
+ Refer to https://github.com/go-git/go-git/blob/master/CONTRIBUTING.md#format-of-the-commit-message for more information.
+ excludeDescription: 'true'
+ excludeTitle: 'true'
+ checkAllCommitMessages: 'true'
+ accessToken: ${{ secrets.GITHUB_TOKEN }}
diff --git a/.github/workflows/stale-issues-bot.yaml b/.github/workflows/stale-issues-bot.yaml
new file mode 100644
index 0000000..11b86ae
--- /dev/null
+++ b/.github/workflows/stale-issues-bot.yaml
@@ -0,0 +1,31 @@
+name: "stale issues bot"
+on:
+ schedule:
+ - cron: "0 7 * * *"
+
+permissions:
+ issues: write
+ pull-requests: write
+
+jobs:
+ stale-bot:
+ runs-on: ubuntu-latest
+ steps:
+ - uses: actions/stale@v9
+ with:
+ ascending: true
+ operations-per-run: 30
+ days-before-stale: 90
+ days-before-close: 30
+ stale-issue-label: stale
+ stale-pr-label: stale
+ exempt-issue-labels: no-autoclose
+ repo-token: ${{ secrets.GITHUB_TOKEN }}
+ stale-issue-message: |
+ To help us keep things tidy and focus on the active tasks, we've introduced a stale bot to spot issues/PRs that haven't had any activity in a while.
+
+ This particular issue hasn't had any updates or activity in the past 90 days, so it's been labeled as 'stale'. If it remains inactive for the next 30 days, it'll be automatically closed.
+
+ We understand everyone's busy, but if this issue is still important to you, please feel free to add a comment or make an update to keep it active.
+
+ Thanks for your understanding and cooperation!
diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml
index ce5872d..f94d3e7 100644
--- a/.github/workflows/test.yml
+++ b/.github/workflows/test.yml
@@ -8,18 +8,18 @@ jobs:
strategy:
fail-fast: false
matrix:
- go-version: [1.19.x, 1.20.x]
+ go-version: [1.19.x, 1.20.x, 1.21.x]
platform: [ubuntu-latest, macos-latest, windows-latest]
runs-on: ${{ matrix.platform }}
steps:
+ - name: Checkout code
+ uses: actions/checkout@v4
+
- name: Install Go
- uses: actions/setup-go@v3
+ uses: actions/setup-go@v5
with:
go-version: ${{ matrix.go-version }}
-
- - name: Checkout code
- uses: actions/checkout@v3
- name: Configure known hosts
if: matrix.platform != 'ubuntu-latest'