-
Notifications
You must be signed in to change notification settings - Fork 337
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Test reusable workflow and detecting changed files
- Loading branch information
1 parent
6eec552
commit a8e179a
Showing
2 changed files
with
58 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
# Copyright 2023 Google LLC | ||
# | ||
# Licensed under the Apache License, Version 2.0 (the "License"); | ||
# you may not use this file except in compliance with the License. | ||
# You may obtain a copy of the License at | ||
# | ||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, software | ||
# distributed under the License is distributed on an "AS IS" BASIS, | ||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
# See the License for the specific language governing permissions and | ||
# limitations under the License. | ||
|
||
name: OSV-Scanner PR scanning | ||
|
||
permissions: | ||
contents: read | ||
|
||
# env: | ||
# # Generator | ||
# BUILDER_BINARY: slsa-generator-generic-linux-amd64 # Name of the binary in the release assets. | ||
# BUILDER_DIR: internal/builders/generic # Source directory if we compile the builder. | ||
|
||
# defaults: | ||
# run: | ||
# shell: bash | ||
|
||
on: | ||
workflow_call: | ||
inputs: | ||
outputs: | ||
|
||
jobs: | ||
scan-pr: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
with: | ||
fetch-depth: 0 | ||
persist-credentials: false | ||
- name: Get changed files | ||
id: changed-files | ||
uses: tj-actions/changed-files@v37 | ||
|
||
# To compare changes between the current commit and the last pushed remote commit set `since_last_remote_commit: true`. e.g | ||
# with: | ||
# since_last_remote_commit: true | ||
|
||
- name: List all changed files | ||
run: | | ||
echo ${{ steps.changed-files.outputs.all_changed_files }} | ||
echo ------------ | ||
for file in ${{ steps.changed-files.outputs.all_changed_files }}; do | ||
echo "$file was changed" | ||
done |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters