mirror of
https://github.com/ossf/scorecard.git
synced 2024-09-11 08:55:27 +03:00
🌱 Switch from paths-ignore to changed-files action to skip required checks. (#2566)
* Switch from paths-ignore to changed-files action. This allows doc only changes to pass CI, which are currently blocked waiting for these required checks which will never run due to the path filter. Signed-off-by: Spencer Schrock <sschrock@google.com> * Pin checkout action. Disable redundant docker build on push to main since cloud build handles the images. Signed-off-by: Spencer Schrock <sschrock@google.com> Signed-off-by: Spencer Schrock <sschrock@google.com>
This commit is contained in:
parent
c6d76807b7
commit
6bf19d5bdb
52
.github/workflows/docker.yml
vendored
52
.github/workflows/docker.yml
vendored
@ -18,27 +18,45 @@ permissions:
|
||||
name: docker-build
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
paths-ignore:
|
||||
- "*.md"
|
||||
pull_request:
|
||||
branches:
|
||||
- main
|
||||
paths-ignore:
|
||||
- "*.md"
|
||||
|
||||
env:
|
||||
PROTOC_VERSION: 3.17.3
|
||||
GO_VERSION: 1.17
|
||||
GO_VERSION: 1.19
|
||||
|
||||
jobs:
|
||||
docs_only_check:
|
||||
name: Check for docs-only change
|
||||
runs-on: ubuntu-latest
|
||||
permissions:
|
||||
contents: read
|
||||
outputs:
|
||||
docs_only: ${{ steps.docs_only_check.outputs.docs_only }}
|
||||
steps:
|
||||
- name: Check out code
|
||||
uses: actions/checkout@755da8c3cf115ac066823e79a1e1788f8940201b #v3.2.0
|
||||
with:
|
||||
fetch-depth: 2
|
||||
- id: files
|
||||
name: Get changed files
|
||||
uses: tj-actions/changed-files@0626c3f94002c0a9d7491dd7fed7055bbdff6f92 #v35.1.0
|
||||
with:
|
||||
files_ignore: '**.md'
|
||||
- id: docs_only_check
|
||||
if: steps.files.outputs.any_changed != 'true'
|
||||
name: Check for docs-only changes
|
||||
run: echo "docs_only=true" >> $GITHUB_OUTPUT
|
||||
|
||||
scorecard:
|
||||
name: scorecard-docker
|
||||
runs-on: ubuntu-latest
|
||||
permissions:
|
||||
contents: read
|
||||
needs:
|
||||
- docs_only_check
|
||||
if: (needs.docs_only_check.outputs.docs_only != 'true')
|
||||
steps:
|
||||
- name: Harden Runner
|
||||
uses: step-security/harden-runner@ebacdc22ef6c2cfb85ee5ded8f2e640f4c776dd5 # v1
|
||||
@ -84,6 +102,9 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
permissions:
|
||||
contents: read
|
||||
needs:
|
||||
- docs_only_check
|
||||
if: (needs.docs_only_check.outputs.docs_only != 'true')
|
||||
steps:
|
||||
- name: Harden Runner
|
||||
uses: step-security/harden-runner@ebacdc22ef6c2cfb85ee5ded8f2e640f4c776dd5 # v1
|
||||
@ -129,6 +150,9 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
permissions:
|
||||
contents: read
|
||||
needs:
|
||||
- docs_only_check
|
||||
if: (needs.docs_only_check.outputs.docs_only != 'true')
|
||||
steps:
|
||||
- name: Harden Runner
|
||||
uses: step-security/harden-runner@ebacdc22ef6c2cfb85ee5ded8f2e640f4c776dd5 # v1
|
||||
@ -174,6 +198,9 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
permissions:
|
||||
contents: read
|
||||
needs:
|
||||
- docs_only_check
|
||||
if: (needs.docs_only_check.outputs.docs_only != 'true')
|
||||
steps:
|
||||
- name: Harden Runner
|
||||
uses: step-security/harden-runner@ebacdc22ef6c2cfb85ee5ded8f2e640f4c776dd5 # v1
|
||||
@ -219,6 +246,9 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
permissions:
|
||||
contents: read
|
||||
needs:
|
||||
- docs_only_check
|
||||
if: (needs.docs_only_check.outputs.docs_only != 'true')
|
||||
steps:
|
||||
- name: Harden Runner
|
||||
uses: step-security/harden-runner@ebacdc22ef6c2cfb85ee5ded8f2e640f4c776dd5 # v1
|
||||
@ -264,6 +294,9 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
permissions:
|
||||
contents: read
|
||||
needs:
|
||||
- docs_only_check
|
||||
if: (needs.docs_only_check.outputs.docs_only != 'true')
|
||||
steps:
|
||||
- name: Harden Runner
|
||||
uses: step-security/harden-runner@ebacdc22ef6c2cfb85ee5ded8f2e640f4c776dd5 # v1
|
||||
@ -309,6 +342,9 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
permissions:
|
||||
contents: read
|
||||
needs:
|
||||
- docs_only_check
|
||||
if: (needs.docs_only_check.outputs.docs_only != 'true')
|
||||
steps:
|
||||
- name: Harden Runner
|
||||
uses: step-security/harden-runner@ebacdc22ef6c2cfb85ee5ded8f2e640f4c776dd5 # v1
|
||||
|
Loading…
Reference in New Issue
Block a user