Skip to content

fix: pass authorization header only if specified #120

fix: pass authorization header only if specified

fix: pass authorization header only if specified #120

Workflow file for this run

# This workflow is provided for testing changes to the action.
# When developing make sure that "Scan 2 - failing" produces expected kube-linter validation logs.
name: kube-linter-action development self-test
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
jobs:
test-scan:
strategy:
matrix:
os: [ ubuntu-latest, windows-latest, macos-latest ]
format: [ plain, json, sarif ]
version: [ latest, 0.2.3 ]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v2
- name: Scan 1 - should succeed
uses: ./
with:
directory: sample/valid-yaml
config: sample/.kube-linter-config.yaml
format: ${{ matrix.format }}
version: ${{ matrix.version }}
- name: Scan 2 - should fail
id: failing-scan
uses: ./
with:
directory: sample/invalid-yaml
config: sample/.kube-linter-config.yaml
format: ${{ matrix.format }}
version: ${{ matrix.version }}
continue-on-error: true
- name: Verify Scan 2 should have failed
shell: bash
run: |
echo "Verifying that kube-linter-action outcome (${{ steps.failing-scan.outcome }}) from Scan 2 is failure."
[[ "${{ steps.failing-scan.outcome }}" == "failure" ]]
test-with-sarif-upload:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
# Setup directory where github/codeql-action/upload-sarif@v1 looks up files by default.
- name: Create ../results directory for sarif files
shell: bash
run: mkdir -p ../results
- name: Scan 1 - should succeed
uses: ./
with:
directory: sample/valid-yaml
config: sample/.kube-linter-config.yaml
format: sarif
output-file: ../results/kube-linter-success.sarif
- name: Scan 2 - should fail
uses: ./
with:
directory: sample/invalid-yaml
config: sample/.kube-linter-config.yaml
format: sarif
output-file: ../results/kube-linter-fail.sarif
continue-on-error: true
- name: Upload SARIF output file to GitHub
uses: github/codeql-action/upload-sarif@v1