Skip to content

Commit

Permalink
Fix CI issues for forked repos (#537)
Browse files Browse the repository at this point in the history
* Fix CI issues for forked repos

Signed-off-by: Jason Hall <jasonhall@redhat.com>

* fix running e2e tests in PRs (and manually)

Signed-off-by: Jason Hall <jasonhall@redhat.com>
  • Loading branch information
imjasonh committed Aug 12, 2021
1 parent b2c649f commit 3b5c238
Showing 1 changed file with 8 additions and 16 deletions.
24 changes: 8 additions & 16 deletions .github/workflows/e2e_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,20 +15,17 @@

name: e2e-tests

# Run this workflow every time a new commit pushed to your repository
on: [push]
# Run on every push and PR, and allow it to be run manually.
on: [push, pull_request, workflow_dispatch]

jobs:
# Set the job key. The key is displayed as the job name
# when a job name is not provided
e2e-tests:
# Name the Job
# Skip if running in a fork that might not have secrets configured.
if: ${{ github.repository == 'sigstore/cosign' }}
name: Run tests
# Set the type of machine to run on
runs-on: ubuntu-latest

steps:
# Checks out a copy of your repository on the ubuntu-latest machine
- uses: actions/checkout@v2
- uses: actions/setup-go@v2
with:
Expand All @@ -39,12 +36,7 @@ jobs:
project_id: projectsigstore
service_account_key: ${{ secrets.GCP_CI_SERVICE_ACCOUNT }}
export_default_credentials: true
- name: Install Crane
run: go install github.com/google/go-containerregistry/cmd/crane
- name: creds
run: gcloud auth configure-docker us-central1-docker.pkg.dev --quiet
# Required for `make cosign-pivkey`
# - name: deps
# run: sudo apt-get update && sudo apt-get install -yq libpcsclite-dev
- name: Run e2e tests that need secrets
run: ./test/e2e_test_secrets.sh
- run: |
go install github.com/google/go-containerregistry/cmd/crane
gcloud auth configure-docker us-central1-docker.pkg.dev --quiet
./test/e2e_test_secrets.sh

0 comments on commit 3b5c238

Please sign in to comment.