summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.github/workflows/main.yml14
1 files changed, 13 insertions, 1 deletions
diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml
index 679ea65..6cb09e8 100644
--- a/.github/workflows/main.yml
+++ b/.github/workflows/main.yml
@@ -13,6 +13,10 @@ on:
- cron: "0 3 * * *"
workflow_dispatch:
workflow_call:
+ inputs:
+ branch:
+ required: true
+ type: string
secrets:
NETLIFY_TOKEN:
required: true
@@ -31,12 +35,20 @@ jobs:
# Steps represent a sequence of tasks that will be executed as part of the job
steps:
- # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
+ # If the workflow is called from this repo, check out the branch it's called from
- uses: actions/checkout@v3
+ if: ${{ inputs.branch == '' }}
with:
repository: vyos/community.vyos.net
ref: ${{ github.ref_name }}
+ # If the workflow is called externally, check out the branch from its inputs
+ - uses: actions/checkout@v3
+ if: ${{ inputs.branch != '' }}
+ with:
+ repository: vyos/community.vyos.net
+ ref: ${{ inputs.branch }}
+
- name: Install build dependencies from the repos
run: |
echo Installing build dependencies