Skip to content

Commit

Permalink
Set branch and git references separately
Browse files Browse the repository at this point in the history
  • Loading branch information
patrickli committed Oct 29, 2023
1 parent 57b725c commit 3ceed3d
Showing 1 changed file with 11 additions and 4 deletions.
15 changes: 11 additions & 4 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,16 @@ name: Build VyOS
on:
workflow_dispatch:
inputs:
ref:
description: Branch or tag to build
version:
description: Version
required: true
type: choice
options:
- equuleus
- sagitta
- current
ref:
description: Branch or tag to build, if different from version
type: string

env:
Expand All @@ -22,9 +29,9 @@ jobs:
uses: actions/checkout@v3
- name: Build ISO
run: |
DOCKER_IMAGE="vyos/vyos-build:${{ github.event.inputs.ref }}"
DOCKER_IMAGE="vyos/vyos-build:${{ github.event.inputs.version }}"
docker pull $DOCKER_IMAGE
git clone -b ${{ github.event.inputs.ref }} --single-branch https://github.com/vyos/vyos-build
git clone -b ${{ github.event.inputs.ref == '' && github.event.inputs.version || github.event.inputs.ref }} --single-branch https://github.com/vyos/vyos-build
cp -r data vyos-build/
cd vyos-build
VYOS_VERSION=$(git describe --tags)
Expand Down

0 comments on commit 3ceed3d

Please sign in to comment.