From ee6a6eb0113d4d9aa8b19f8a140f97d785d9945d Mon Sep 17 00:00:00 2001 From: 9l <9l@users.noreply.github.com> Date: Sat, 15 Aug 2020 20:59:06 +0800 Subject: [PATCH] init commit --- .../workflows/vyos-1.3-rolling-release.yml | 36 +++++++++ .github/workflows/vyos-v1.2-lts-release.yml | 77 +++++++++++++++++++ LICENSE | 21 +++++ README.md | 3 + 4 files changed, 137 insertions(+) create mode 100644 .github/workflows/vyos-1.3-rolling-release.yml create mode 100644 .github/workflows/vyos-v1.2-lts-release.yml create mode 100644 LICENSE create mode 100644 README.md diff --git a/.github/workflows/vyos-1.3-rolling-release.yml b/.github/workflows/vyos-1.3-rolling-release.yml new file mode 100644 index 0000000..bb0d8c1 --- /dev/null +++ b/.github/workflows/vyos-1.3-rolling-release.yml @@ -0,0 +1,36 @@ +name: VyOS 1.3 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.3-rolling + +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 VyOS ISO + working-directory: ./vyos-build + run: | + ./configure --architecture $ARCHITECTURE --build-by "$BUILD_BY" + sudo make iso + + - name: Upload VyOS ISO file + uses: actions/upload-artifact@v2 + with: + name: vyos-${{ env.VERSION }}-${{ env.ARCHITECTURE }}-iso + path: vyos-build/build/vyos-${{ env.VERSION }}-*.iso diff --git a/.github/workflows/vyos-v1.2-lts-release.yml b/.github/workflows/vyos-v1.2-lts-release.yml new file mode 100644 index 0000000..c36a7bc --- /dev/null +++ b/.github/workflows/vyos-v1.2-lts-release.yml @@ -0,0 +1,77 @@ +name: VyOS v1.2 LTS Release + +on: + push: + tags: + - 'v1.2.*' + +env: + GIT_CLONE_URL: https://github.com/vyos/vyos-build + BRANCH: crux + ARCHITECTURE: amd64 + BUILD_BY: vyos-build-action@github.com + BUILD_TYPE: release + VERSION: 1.2.5 + +jobs: + build: + runs-on: ubuntu-latest + container: + image: vyos/vyos-build:crux + options: --workdir /vyos --privileged + + steps: + - name: Clone source code + run: git clone -b $BRANCH --single-branch $GIT_CLONE_URL + + - name: Build VyOS ISO + working-directory: ./vyos-build + run: | + ./configure --architecture $ARCHITECTURE --build-by "$BUILD_BY" --build-type '$BUILD_TYPE' --version $VERSION + sudo make iso + + - name: Upload VyOS ISO file + uses: actions/upload-artifact@v2 + with: + name: vyos-${{ env.VERSION }}-${{ env.ARCHITECTURE }}-iso + path: vyos-build/build/vyos-${{ env.VERSION }}-*.iso + + release: + runs-on: ubuntu-latest + needs: build + + steps: + - name: Download artifact + uses: actions/download-artifact@v2 + with: + name: vyos-${{ env.VERSION }}-${{ env.ARCHITECTURE }}-iso + path: vyos-${{ env.VERSION }}-${{ env.ARCHITECTURE }}-iso + + - name: show artifact folder + run: | + ls -al vyos-${{ env.VERSION }}-${{ env.ARCHITECTURE }}-iso + cd vyos-${{ env.VERSION }}-${{ env.ARCHITECTURE }}-iso + pwd + + - name: Create release + id: create_release + uses: actions/create-release@v1 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + tag_name: ${{ github.ref }} + release_name: VyOS ${{ github.ref }} + body: VyOS v${{ env.VERSION }} + draft: false + prerelease: false + + - name: Upload Release Asset + id: upload-release-asset + uses: actions/upload-release-asset@v1 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + upload_url: ${{ steps.create_release.outputs.upload_url }} + asset_path: vyos-${{ env.VERSION }}-${{ env.ARCHITECTURE }}-iso/vyos-${{ env.VERSION }}-${{ env.ARCHITECTURE }}.iso + asset_name: vyos-${{ env.VERSION }}-${{ env.ARCHITECTURE }}.iso + asset_content_type: application/octet-stream diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..3244aab --- /dev/null +++ b/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2020 9l + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/README.md b/README.md new file mode 100644 index 0000000..a25c79e --- /dev/null +++ b/README.md @@ -0,0 +1,3 @@ +# VyOS ISO Automation Build + +Automate build VyOS v1.2 LTS Release and v1.3 Rolling Release ISO files.