Skip to content

Commit

Permalink
ci: don't checkout head ref for PRs from forks
Browse files Browse the repository at this point in the history
  • Loading branch information
thomasten committed Dec 19, 2022
1 parent 5fcc815 commit 990cae5
Show file tree
Hide file tree
Showing 36 changed files with 58 additions and 58 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/azure-snp-reporter.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
- name: Checkout
uses: actions/checkout@755da8c3cf115ac066823e79a1e1788f8940201b # v3.2.0
with:
ref: ${{ github.head_ref }}
ref: ${{ !github.event.pull_request.head.repo.fork && github.head_ref || '' }}

- name: Set up Go
uses: actions/setup-go@6edd4406fa81c3da01a34fa6f6343087c207a568 # v3.5.0
Expand All @@ -37,7 +37,7 @@ jobs:
- name: Checkout
uses: actions/checkout@755da8c3cf115ac066823e79a1e1788f8940201b # v3.2.0
with:
ref: ${{ github.head_ref }}
ref: ${{ !github.event.pull_request.head.repo.fork && github.head_ref || '' }}

- name: Fetch SNP report
uses: ./.github/actions/azure_snp_reporter
Expand All @@ -60,7 +60,7 @@ jobs:
- name: Checkout
uses: actions/checkout@755da8c3cf115ac066823e79a1e1788f8940201b # v3.2.0
with:
ref: ${{ github.head_ref }}
ref: ${{ !github.event.pull_request.head.repo.fork && github.head_ref || '' }}

- name: Set up Go
uses: actions/setup-go@6edd4406fa81c3da01a34fa6f6343087c207a568 # v3.5.0
Expand Down
14 changes: 7 additions & 7 deletions .github/workflows/build-binaries.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ jobs:
- name: Checkout
uses: actions/checkout@755da8c3cf115ac066823e79a1e1788f8940201b # v3.2.0
with:
ref: ${{ github.head_ref }}
ref: ${{ !github.event.pull_request.head.repo.fork && github.head_ref || '' }}

- name: Setup Go environment
uses: actions/setup-go@6edd4406fa81c3da01a34fa6f6343087c207a568 # v3.5.0
Expand All @@ -40,7 +40,7 @@ jobs:
- name: Checkout
uses: actions/checkout@755da8c3cf115ac066823e79a1e1788f8940201b # v3.2.0
with:
ref: ${{ github.head_ref }}
ref: ${{ !github.event.pull_request.head.repo.fork && github.head_ref || '' }}

- name: Setup Go environment
uses: actions/setup-go@6edd4406fa81c3da01a34fa6f6343087c207a568 # v3.5.0
Expand All @@ -56,7 +56,7 @@ jobs:
- name: Checkout
uses: actions/checkout@755da8c3cf115ac066823e79a1e1788f8940201b # v3.2.0
with:
ref: ${{ github.head_ref }}
ref: ${{ !github.event.pull_request.head.repo.fork && github.head_ref || '' }}

- name: Setup Go environment
uses: actions/setup-go@6edd4406fa81c3da01a34fa6f6343087c207a568 # v3.5.0
Expand All @@ -81,7 +81,7 @@ jobs:
- name: Checkout
uses: actions/checkout@755da8c3cf115ac066823e79a1e1788f8940201b # v3.2.0
with:
ref: ${{ github.head_ref }}
ref: ${{ !github.event.pull_request.head.repo.fork && github.head_ref || '' }}

- name: Setup Go environment
uses: actions/setup-go@6edd4406fa81c3da01a34fa6f6343087c207a568 # v3.5.0
Expand All @@ -105,7 +105,7 @@ jobs:
- name: Checkout
uses: actions/checkout@755da8c3cf115ac066823e79a1e1788f8940201b # v3.2.0
with:
ref: ${{ github.head_ref }}
ref: ${{ !github.event.pull_request.head.repo.fork && github.head_ref || '' }}

- name: Setup Go environment
uses: actions/setup-go@6edd4406fa81c3da01a34fa6f6343087c207a568 # v3.5.0
Expand All @@ -120,7 +120,7 @@ jobs:
- name: Checkout
uses: actions/checkout@755da8c3cf115ac066823e79a1e1788f8940201b # v3.2.0
with:
ref: ${{ github.head_ref }}
ref: ${{ !github.event.pull_request.head.repo.fork && github.head_ref || '' }}

- name: Setup Go environment
uses: actions/setup-go@6edd4406fa81c3da01a34fa6f6343087c207a568 # v3.5.0
Expand All @@ -145,7 +145,7 @@ jobs:
- name: Checkout
uses: actions/checkout@755da8c3cf115ac066823e79a1e1788f8940201b # v3.2.0
with:
ref: ${{ github.head_ref }}
ref: ${{ !github.event.pull_request.head.repo.fork && github.head_ref || '' }}

- name: Setup Go environment
uses: actions/setup-go@6edd4406fa81c3da01a34fa6f6343087c207a568 # v3.5.0
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/build-constellation-node-operator.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:
id: checkout
uses: actions/checkout@755da8c3cf115ac066823e79a1e1788f8940201b # v3.2.0
with:
ref: ${{ github.head_ref }}
ref: ${{ !github.event.pull_request.head.repo.fork && github.head_ref || '' }}

- name: Setup Go environment
uses: actions/setup-go@6edd4406fa81c3da01a34fa6f6343087c207a568 # v3.5.0
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/build-gcp-guest-agent.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ jobs:
- uses: actions/checkout@755da8c3cf115ac066823e79a1e1788f8940201b # v3.2.0
with:
path: "constellation"
ref: ${{ github.head_ref }}
ref: ${{ !github.event.pull_request.head.repo.fork && github.head_ref || '' }}

- name: Docker meta
id: meta
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/build-joinservice-image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:
id: checkout
uses: actions/checkout@755da8c3cf115ac066823e79a1e1788f8940201b # v3.2.0
with:
ref: ${{ github.head_ref }}
ref: ${{ !github.event.pull_request.head.repo.fork && github.head_ref || '' }}

- name: Setup Go environment
uses: actions/setup-go@6edd4406fa81c3da01a34fa6f6343087c207a568 # v3.5.0
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/build-kms-image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:
id: checkout
uses: actions/checkout@755da8c3cf115ac066823e79a1e1788f8940201b # v3.2.0
with:
ref: ${{ github.head_ref }}
ref: ${{ !github.event.pull_request.head.repo.fork && github.head_ref || '' }}

- name: Setup Go environment
uses: actions/setup-go@6edd4406fa81c3da01a34fa6f6343087c207a568 # v3.5.0
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/build-logcollector-images.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:
id: checkout
uses: actions/checkout@755da8c3cf115ac066823e79a1e1788f8940201b # v3.2.0
with:
ref: ${{ github.head_ref }}
ref: ${{ !github.event.pull_request.head.repo.fork && github.head_ref || '' }}

- name: Build and upload logstash container image
uses: ./.github/actions/build_micro_service
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/build-micro-service-manual.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ jobs:
id: checkout
uses: actions/checkout@755da8c3cf115ac066823e79a1e1788f8940201b # v3.2.0
with:
ref: ${{ github.head_ref }}
ref: ${{ !github.event.pull_request.head.repo.fork && github.head_ref || '' }}

- name: Setup Go environment
uses: actions/setup-go@6edd4406fa81c3da01a34fa6f6343087c207a568 # v3.5.0
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/build-operator-manual.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
id: checkout
uses: actions/checkout@755da8c3cf115ac066823e79a1e1788f8940201b # v3.2.0
with:
ref: ${{ github.head_ref }}
ref: ${{ !github.event.pull_request.head.repo.fork && github.head_ref || '' }}

- name: Setup Go environment
uses: actions/setup-go@6edd4406fa81c3da01a34fa6f6343087c207a568 # v3.5.0
Expand Down
12 changes: 6 additions & 6 deletions .github/workflows/build-os-image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ jobs:
- name: Checkout
uses: actions/checkout@755da8c3cf115ac066823e79a1e1788f8940201b # v3.2.0
with:
ref: ${{ github.head_ref }}
ref: ${{ !github.event.pull_request.head.repo.fork && github.head_ref || '' }}

- name: Build bootstrapper
if: inputs.stream != 'debug'
Expand Down Expand Up @@ -87,7 +87,7 @@ jobs:
- name: Checkout
uses: actions/checkout@755da8c3cf115ac066823e79a1e1788f8940201b # v3.2.0
with:
ref: ${{ github.head_ref }}
ref: ${{ !github.event.pull_request.head.repo.fork && github.head_ref || '' }}

- name: Determine version
id: version
Expand Down Expand Up @@ -201,7 +201,7 @@ jobs:
- name: Checkout
uses: actions/checkout@755da8c3cf115ac066823e79a1e1788f8940201b # v3.2.0
with:
ref: ${{ github.head_ref }}
ref: ${{ !github.event.pull_request.head.repo.fork && github.head_ref || '' }}

- name: Download build dependencies
uses: actions/download-artifact@9782bd6a9848b53b110e712e20e42d89988822b7 # tag=v3.0.1
Expand Down Expand Up @@ -311,7 +311,7 @@ jobs:
- name: Checkout
uses: actions/checkout@755da8c3cf115ac066823e79a1e1788f8940201b # v3.2.0
with:
ref: ${{ github.head_ref }}
ref: ${{ !github.event.pull_request.head.repo.fork && github.head_ref || '' }}

- name: Download OS image artifact
uses: actions/download-artifact@9782bd6a9848b53b110e712e20e42d89988822b7 # tag=v3.0.1
Expand Down Expand Up @@ -498,7 +498,7 @@ jobs:
- name: Checkout repository
uses: actions/checkout@755da8c3cf115ac066823e79a1e1788f8940201b # v3.2.0
with:
ref: ${{ github.head_ref }}
ref: ${{ !github.event.pull_request.head.repo.fork && github.head_ref || '' }}

- name: Login to AWS
uses: aws-actions/configure-aws-credentials@67fbcbb121271f7775d2e7715933280b06314838 # tag=v1.7.0
Expand Down Expand Up @@ -720,7 +720,7 @@ jobs:
- name: Checkout
uses: actions/checkout@755da8c3cf115ac066823e79a1e1788f8940201b # v3.2.0
with:
ref: ${{ github.head_ref }}
ref: ${{ !github.event.pull_request.head.repo.fork && github.head_ref || '' }}

- name: Setup Go environment
uses: actions/setup-go@6edd4406fa81c3da01a34fa6f6343087c207a568 # v3.5.0
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/build-qemu-metadata-image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:
id: checkout
uses: actions/checkout@755da8c3cf115ac066823e79a1e1788f8940201b # v3.2.0
with:
ref: ${{ github.head_ref }}
ref: ${{ !github.event.pull_request.head.repo.fork && github.head_ref || '' }}

- name: Setup Go environment
uses: actions/setup-go@6edd4406fa81c3da01a34fa6f6343087c207a568 # v3.5.0
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/build-verification-service.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:
id: checkout
uses: actions/checkout@755da8c3cf115ac066823e79a1e1788f8940201b # v3.2.0
with:
ref: ${{ github.head_ref }}
ref: ${{ !github.event.pull_request.head.repo.fork && github.head_ref || '' }}

- name: Setup Go environment
uses: actions/setup-go@6edd4406fa81c3da01a34fa6f6343087c207a568 # v3.5.0
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/check-licenses.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:
- name: Checkout
uses: actions/checkout@755da8c3cf115ac066823e79a1e1788f8940201b # v3.2.0
with:
ref: ${{ github.head_ref }}
ref: ${{ !github.event.pull_request.head.repo.fork && github.head_ref || '' }}

- name: Setup Go environment
uses: actions/setup-go@6edd4406fa81c3da01a34fa6f6343087c207a568 # v3.5.0
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/check-links.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:
- name: Checkout
uses: actions/checkout@755da8c3cf115ac066823e79a1e1788f8940201b # v3.2.0
with:
ref: ${{ github.head_ref }}
ref: ${{ !github.event.pull_request.head.repo.fork && github.head_ref || '' }}

- name: Link Checker
uses: lycheeverse/lychee-action@4dcb8bee2a0a4531cba1a1f392c54e8375d6dd81 # v1.5.4
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/docs-update-reference.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
steps:
- uses: actions/checkout@755da8c3cf115ac066823e79a1e1788f8940201b # v3.2.0
with:
ref: ${{ github.head_ref }}
ref: ${{ !github.event.pull_request.head.repo.fork && github.head_ref || '' }}

- name: pull-request
uses: repo-sync/pull-request@65785d95a5a466e46a9d0708933a3bd51bbf9dde # tag=v2.6.2
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/docs-vale.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
- name: Checkout
uses: actions/checkout@755da8c3cf115ac066823e79a1e1788f8940201b # v3.2.0
with:
ref: ${{ github.head_ref }}
ref: ${{ !github.event.pull_request.head.repo.fork && github.head_ref || '' }}

- name: Vale
uses: errata-ai/vale-action@753427452ff1d6cf7a7b76a552aa0cbee3971551 # tag=v1.5.0
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/e2e-test-daily.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ jobs:
- name: Checkout
uses: actions/checkout@755da8c3cf115ac066823e79a1e1788f8940201b # v3.2.0
with:
ref: ${{ github.head_ref }}
ref: ${{ !github.event.pull_request.head.repo.fork && github.head_ref || '' }}

- name: Find latest image
id: find-latest-image
Expand All @@ -48,7 +48,7 @@ jobs:
uses: actions/checkout@755da8c3cf115ac066823e79a1e1788f8940201b # v3.2.0
with:
fetch-depth: 0
ref: ${{ github.head_ref }}
ref: ${{ !github.event.pull_request.head.repo.fork && github.head_ref || '' }}

- name: Setup Go environment
uses: actions/setup-go@6edd4406fa81c3da01a34fa6f6343087c207a568 # v3.5.0
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/e2e-test-manual-macos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ jobs:
if: ${{ github.event.steps.check-bootstrapper-cache.cache-hit != 'true'}}
uses: actions/checkout@755da8c3cf115ac066823e79a1e1788f8940201b # v3.2.0
with:
ref: ${{ github.head_ref }}
ref: ${{ !github.event.pull_request.head.repo.fork && github.head_ref || '' }}

- name: Build bootstrapper
if: ${{ github.event.steps.check-bootstrapper-cache.cache-hit != 'true'}}
Expand Down Expand Up @@ -114,7 +114,7 @@ jobs:
- name: Checkout
uses: actions/checkout@755da8c3cf115ac066823e79a1e1788f8940201b # v3.2.0
with:
ref: ${{ github.head_ref }}
ref: ${{ !github.event.pull_request.head.repo.fork && github.head_ref || '' }}

- name: Find latest image
id: find-latest-image
Expand All @@ -140,7 +140,7 @@ jobs:
- name: Check out repository
uses: actions/checkout@755da8c3cf115ac066823e79a1e1788f8940201b # v3.2.0
with:
ref: ${{ github.head_ref }}
ref: ${{ !github.event.pull_request.head.repo.fork && github.head_ref || '' }}

- name: Setup Go environment
uses: actions/setup-go@6edd4406fa81c3da01a34fa6f6343087c207a568 # v3.5.0
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/e2e-test-manual.yml
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ jobs:
- name: Checkout
uses: actions/checkout@755da8c3cf115ac066823e79a1e1788f8940201b # v3.2.0
with:
ref: ${{ github.head_ref }}
ref: ${{ !github.event.pull_request.head.repo.fork && github.head_ref || '' }}

- name: Find latest image
id: find-latest-image
Expand All @@ -106,7 +106,7 @@ jobs:
- name: Check out repository
uses: actions/checkout@755da8c3cf115ac066823e79a1e1788f8940201b # v3.2.0
with:
ref: ${{ github.head_ref }}
ref: ${{ !github.event.pull_request.head.repo.fork && github.head_ref || '' }}

- name: Setup Go environment
uses: actions/setup-go@6edd4406fa81c3da01a34fa6f6343087c207a568 # v3.5.0
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/e2e-test-weekly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ jobs:
- name: Checkout
uses: actions/checkout@755da8c3cf115ac066823e79a1e1788f8940201b # v3.2.0
with:
ref: ${{ github.head_ref }}
ref: ${{ !github.event.pull_request.head.repo.fork && github.head_ref || '' }}

- name: Find latest image
id: find-latest-image
Expand Down Expand Up @@ -71,7 +71,7 @@ jobs:
uses: actions/checkout@755da8c3cf115ac066823e79a1e1788f8940201b # v3.2.0
with:
fetch-depth: 0
ref: ${{ github.head_ref }}
ref: ${{ !github.event.pull_request.head.repo.fork && github.head_ref || '' }}

- name: Setup Go environment
uses: actions/setup-go@6edd4406fa81c3da01a34fa6f6343087c207a568 # v3.5.0
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/generate-measurements.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ jobs:
- name: Check out repository
uses: actions/checkout@755da8c3cf115ac066823e79a1e1788f8940201b # v3.2.0
with:
ref: ${{ github.head_ref }}
ref: ${{ !github.event.pull_request.head.repo.fork && github.head_ref || '' }}

- name: Extract ref, stream and version
id: extract
Expand Down Expand Up @@ -195,7 +195,7 @@ jobs:
- name: Check out repository
uses: actions/checkout@755da8c3cf115ac066823e79a1e1788f8940201b # v3.2.0
with:
ref: ${{ github.head_ref }}
ref: ${{ !github.event.pull_request.head.repo.fork && github.head_ref || '' }}

- name: Setup Go environment
uses: actions/setup-go@6edd4406fa81c3da01a34fa6f6343087c207a568 # v3.5.0
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/on-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ jobs:
- name: Checkout
uses: actions/checkout@755da8c3cf115ac066823e79a1e1788f8940201b # v3.2.0
with:
ref: ${{ github.head_ref }}
ref: ${{ !github.event.pull_request.head.repo.fork && github.head_ref || '' }}

- name: Setup Go environment
uses: actions/setup-go@6edd4406fa81c3da01a34fa6f6343087c207a568 # v3.5.0
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/release-cli.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
id: checkout
uses: actions/checkout@755da8c3cf115ac066823e79a1e1788f8940201b # v3.2.0
with:
ref: ${{ github.head_ref }}
ref: ${{ !github.event.pull_request.head.repo.fork && github.head_ref || '' }}
- name: Setup Go environment
uses: actions/setup-go@6edd4406fa81c3da01a34fa6f6343087c207a568 # v3.5.0
with:
Expand Down Expand Up @@ -85,7 +85,7 @@ jobs:
id: checkout
uses: actions/checkout@755da8c3cf115ac066823e79a1e1788f8940201b # v3.2.0
with:
ref: ${{ github.head_ref }}
ref: ${{ !github.event.pull_request.head.repo.fork && github.head_ref || '' }}
- name: Login to Azure
uses: ./.github/actions/login_azure
with:
Expand All @@ -112,7 +112,7 @@ jobs:
id: checkout
uses: actions/checkout@755da8c3cf115ac066823e79a1e1788f8940201b # v3.2.0
with:
ref: ${{ github.head_ref }}
ref: ${{ !github.event.pull_request.head.repo.fork && github.head_ref || '' }}
- name: Download syft & grype
run: |
SYFT_VERSION=0.62.1
Expand Down
Loading

0 comments on commit 990cae5

Please sign in to comment.