Skip to content

Commit

Permalink
Add ssh-key option
Browse files Browse the repository at this point in the history
  • Loading branch information
samuelburnham committed Mar 20, 2024
1 parent 6fe9d3c commit e1f24e7
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions .github/workflows/check-downstream-compiles.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,10 @@ name: Check downstream dependency compiles

on:
workflow_call:
secrets:
SSH_PRIVATE_KEY:
required: false
description: ''
inputs:
runner:
required: false
Expand All @@ -21,6 +25,11 @@ on:
required: false
default: 'lurk-lab/lurk-rs'
type: string
# Used to checkout private repos
ssh-key:
required: false
default: false
type: boolean
# List of prerequisite Ubuntu packages, separated by whitespace
packages:
required: false
Expand All @@ -39,6 +48,10 @@ jobs:
if: inputs.packages != ''
with:
packages: "${{ inputs.packages }}"
- uses: webfactory/[email protected]
if: inputs.ssh-key
with:
ssh-private-key: "${{ secrets.SSH_PRIVATE_KEY }}"
- name: Set env
run: |
echo "DOWNSTREAM_REPO=$(echo ${{ inputs.repository }} | awk -F'/' '{ print $2 }')" | tee -a $GITHUB_ENV
Expand All @@ -48,10 +61,18 @@ jobs:
path: ${{ github.workspace }}/${{ env.UPSTREAM_REPO }}
submodules: recursive
- uses: actions/checkout@v4
if: !inputs.ssh-key
with:
repository: ${{ inputs.repository }}
path: ${{ github.workspace }}/${{ env.DOWNSTREAM_REPO }}
submodules: recursive
- uses: actions/checkout@v4
if: inputs.ssh-key
with:
repository: ${{ inputs.repository }}
path: ${{ github.workspace }}/${{ env.DOWNSTREAM_REPO }}
submodules: recursive
ssh-key: "${{ secrets.SSH_PRIVATE_KEY }}"
- uses: dtolnay/rust-toolchain@stable
- uses: Swatinem/rust-cache@v2
- name: Patch Cargo.toml
Expand Down

0 comments on commit e1f24e7

Please sign in to comment.