Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 19 additions & 6 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ defaults:

permissions:
contents: read
checks: write # Used to annotate code in the PR

jobs:
changes:
Expand All @@ -31,10 +30,11 @@ jobs:
with:
ref: ${{ github.event.pull_request.head.sha }}
fetch-depth: ${{ steps.base-depth.outputs.base-depth }}
persist-credentials: false
- name: detect
id: detect
run: |
git fetch origin ${{ github.base_ref }}
git fetch origin ${GITHUB_BASE_REF}
CHANGED_FILES=$(git diff --name-only ${{ github.event.pull_request.base.sha }}...${{ github.event.pull_request.head.sha }} | tr ' ' '\n')

echo -e "Changed files:\n${CHANGED_FILES}"
Expand All @@ -55,6 +55,8 @@ jobs:
if: ${{ needs.changes.outputs.non-docs == 'true' }}
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
persist-credentials: false
- uses: actions/setup-go@7a3fe6cf4cb3a834922a1244abfce67bcef6a0c5 # v6.2.0
with:
go-version-file: "go.mod"
Expand All @@ -64,11 +66,15 @@ jobs:
linting:
name: lint
runs-on: ubuntu-latest
permissions:
contents: read
checks: write # Used by golangci-lint to annotate code in the PR
needs: [changes]
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
fetch-depth: 0
persist-credentials: false
- uses: actions/setup-go@7a3fe6cf4cb3a834922a1244abfce67bcef6a0c5 # v6.2.0
with:
go-version-file: "go.mod"
Expand Down Expand Up @@ -102,6 +108,8 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
persist-credentials: false
- uses: actions/setup-go@7a3fe6cf4cb3a834922a1244abfce67bcef6a0c5 # v6.2.0
with:
go-version-file: "go.mod"
Expand All @@ -121,10 +129,10 @@ jobs:
- name: Check CI results
run: |
results=(
"build=${{ needs.build.result }}"
"linting=${{ needs.linting.result }}"
"tests=${{ needs.tests.result }}"
"e2e-tests=${{ needs.e2e-tests.result }}"
"build=${NEEDS_BUILD_RESULT}"
"linting=${NEEDS_LINTING_RESULT}"
"tests=${NEEDS_TESTS_RESULT}"
"e2e-tests=${NEEDS_E2E_TESTS_RESULT}"
)
failed=0
for r in "${results[@]}"; do
Expand All @@ -142,3 +150,8 @@ jobs:
fi
echo ""
echo "All CI checks passed"
env:
NEEDS_BUILD_RESULT: ${{ needs.build.result }}
NEEDS_LINTING_RESULT: ${{ needs.linting.result }}
NEEDS_TESTS_RESULT: ${{ needs.tests.result }}
NEEDS_E2E_TESTS_RESULT: ${{ needs.e2e-tests.result }}
2 changes: 2 additions & 0 deletions .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,8 @@ jobs:
steps:
- name: Checkout repository
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
persist-credentials: false

# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/go-coverage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ jobs:
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
path: ${{ github.workspace }}/src/github.com/tektoncd/chains
persist-credentials: false

- name: Set up Go
uses: actions/setup-go@7a3fe6cf4cb3a834922a1244abfce67bcef6a0c5 # v6.2.0
Expand Down
6 changes: 6 additions & 0 deletions .github/workflows/goclean.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
name: goclean

permissions:
contents: read

on:
push:
paths:
Expand All @@ -25,11 +28,14 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
persist-credentials: false

- name: Setup Go
uses: actions/setup-go@7a3fe6cf4cb3a834922a1244abfce67bcef6a0c5 # v6.2.0
with:
go-version-file: "go.mod"
cache: false

- name: go vet
run: |
Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/kind-e2e.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ defaults:

jobs:
k8s:
permissions:
contents: read
concurrency:
group: ${{ github.workflow }}-${{ matrix.k8s-version }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
Expand All @@ -33,6 +35,8 @@ jobs:
k8s-version: ${{ matrix.k8s-version }}
pipelines-release: v1.2.0 # Latest version
pipelines-lts:
permissions:
contents: read
concurrency:
group: ${{ github.workflow }}-${{ matrix.pipelines-release }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
Expand Down
4 changes: 3 additions & 1 deletion .github/workflows/reusable-e2e.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,8 @@ jobs:

- name: Check out our repo
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
persist-credentials: false

- name: Set up Go
uses: actions/setup-go@7a3fe6cf4cb3a834922a1244abfce67bcef6a0c5 # v6.2.0
Expand All @@ -53,7 +55,7 @@ jobs:

- name: Install Tekton pipelines
run: |
while ! kubectl apply --filename ${{ env.TEKTON_PIPELINES_RELEASE }}
while ! kubectl apply --filename ${TEKTON_PIPELINES_RELEASE}
do
echo "waiting for tekton pipelines to get installed"
sleep 2
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/test-on-microshift.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ jobs:
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
path: ${{ github.workspace }}/src/github.com/tektoncd/chains
persist-credentials: false

- uses: imjasonh/setup-ko@d006021bd0c28d1ce33a07e7943d48b079944c8d # v0.9

Expand Down Expand Up @@ -66,4 +67,4 @@ jobs:

export KUBECONFIG=$HOME/.kube/config

source ${{ github.workspace }}/src/github.com/tektoncd/chains/test/microshift_test.sh
source ${{ github.workspace }}/src/github.com/tektoncd/chains/test/microshift_test.sh
23 changes: 23 additions & 0 deletions .github/workflows/zizmor.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: GitHub Actions Security Analysis with zizmor

on:
push:
branches: ["main"]
pull_request:
branches: ["**"]

permissions: {}

jobs:
zizmor:
runs-on: ubuntu-latest
permissions:
security-events: write
steps:
- name: Checkout repository
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
persist-credentials: false

- name: Run zizmor
uses: zizmorcore/zizmor-action@71321a20a9ded102f6e9ce5718a2fcec2c4f70d8 # v0.5.2
Loading