VyOS v1.4 Rolling Release #1015
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: VyOS v1.4 Rolling Release | |
on: | |
schedule: | |
- cron: 0 3 * * * | |
env: | |
GIT_CLONE_URL: https://github.com/vyos/vyos-build | |
BRANCH: current | |
ARCHITECTURE: amd64 | |
BUILD_BY: vyos-build-action@github.com | |
BUILD_TYPE: release | |
VERSION: 1.4-rolling | |
DEBIAN_MIRROR: http://ftp.us.debian.org/debian/ | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
container: | |
image: vyos/vyos-build:current | |
options: --workdir /vyos --privileged | |
steps: | |
- name: Clone source code | |
run: git clone -b $BRANCH --single-branch $GIT_CLONE_URL | |
- name: Build ISO | |
working-directory: ./vyos-build | |
run: | | |
sudo make clean | |
sudo ./build-vyos-image iso --architecture $ARCHITECTURE --build-by $BUILD_BY --build-type $BUILD_TYPE --version $VERSION-$(date +%Y%m%d%H%M) | |
- name: Upload artifact | |
uses: actions/upload-artifact@v4 | |
with: | |
name: vyos-${{ env.VERSION }}-${{ env.ARCHITECTURE }}-iso | |
path: vyos-build/build/vyos-${{ env.VERSION }}-*.iso | |
release: | |
needs: build | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Download artifact | |
uses: actions/download-artifact@v4 | |
with: | |
name: vyos-${{ env.VERSION }}-${{ env.ARCHITECTURE }}-iso | |
path: vyos-${{ env.VERSION }}-${{ env.ARCHITECTURE }}-iso | |
- name: Upload release asset | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
run: | | |
asset=$(find ./vyos-${{ env.VERSION }}-${{ env.ARCHITECTURE }}-iso/ -name "vyos-${{ env.VERSION }}-*.iso" | xargs) | |
tag_name="v${{ env.VERSION }}" | |
gh release upload "$tag_name" "$asset" | |
delete_old_workflow_runs: | |
needs: release | |
runs-on: ubuntu-latest | |
steps: | |
- name: Delete old workflow runs | |
uses: GitRML/delete-workflow-runs@main | |
with: | |
retain_days: 31 |