summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniil Baturin <daniil@baturin.org>2024-04-30 11:30:14 +0100
committerDaniil Baturin <daniil@baturin.org>2024-04-30 11:34:51 +0100
commitf0ea41420d59a6cb59dbf2686f299d2dc6ba1c6e (patch)
treebe4b9a2954aa56dd0b132d8880f6513910883b4e
parent3322af2432cfed96e1af6559faff97d3ef189b92 (diff)
downloadcommunity.vyos.net-f0ea41420d59a6cb59dbf2686f299d2dc6ba1c6e.tar.gz
community.vyos.net-f0ea41420d59a6cb59dbf2686f299d2dc6ba1c6e.zip
Add an option to take the branch from the inputs
-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