diff options
author | Daniil Baturin <daniil@baturin.org> | 2024-04-30 11:30:14 +0100 |
---|---|---|
committer | Daniil Baturin <daniil@baturin.org> | 2024-04-30 11:36:58 +0100 |
commit | 7eeb7a3d36b133e03d6580922181fcd000b4a0d7 (patch) | |
tree | be4b9a2954aa56dd0b132d8880f6513910883b4e | |
parent | 81fe00c06465aab16fd4443f418659bb935d5da0 (diff) | |
download | community.vyos.net-7eeb7a3d36b133e03d6580922181fcd000b4a0d7.tar.gz community.vyos.net-7eeb7a3d36b133e03d6580922181fcd000b4a0d7.zip |
Add an option to take the branch from the inputs
-rw-r--r-- | .github/workflows/main.yml | 14 |
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 |