Skip to content

Commit

Permalink
Initial
Browse files Browse the repository at this point in the history
  • Loading branch information
majst01 committed Jul 15, 2024
0 parents commit 8e2092a
Show file tree
Hide file tree
Showing 3 changed files with 90 additions and 0 deletions.
29 changes: 29 additions & 0 deletions .github/release-drafter.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name-template: 'SONiC $INPUT_VERSION'

template: |
## General Changes
$CHANGES
categories:
- title: '🚀 Features'
labels:
- 'feature'
- 'enhancement'
- title: '🐛 Bug Fixes'
labels:
- 'fix'
- 'bugfix'
- 'bug'

version-resolver:
major:
labels:
- 'major'
minor:
labels:
- 'minor'
patch:
labels:
- 'patch'
default: patch
58 changes: 58 additions & 0 deletions .github/workflows/sonic.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
name: SONiC Build

on:
push:
branches:
- main

jobs:
test:
name: Build SONiC
runs-on: self-hosted

steps:
- name: Gain back workspace permissions # https://github.com/actions/checkout/issues/211
run: |
[ -d "${GITHUB_WORKSPACE}" ] && sudo chown -R $USER:$USER ${GITHUB_WORKSPACE}
- name: Checkout
uses: actions/checkout@v4

- name: Install build requirements
shell: bash
run: |
sudo apt install --yes j2cli
sudo mkdir -p /var/cache/sonic/artifacts
sudo chmod 777 /var/cache/sonic/artifacts
- name: build sonic-vs
shell: bash
run: |
git clone --recurse-submodules https://github.com/sonic-net/sonic-buildimage.git
cd sonic-buildimage
git checkout 202405
make init
make configure PLATFORM=vs
make SONIC_BUILD_JOBS=8 target/sonic-vs.img.gz
ls -l target
- name: Upload Release Asset
uses: softprops/action-gh-release@v2
with:
token: ${{ secrets.GITHUB_TOKEN }}
files: |
target/sonic-vs.img.gz
if: ${{ github.event_name == 'release' }}

release-drafter:
runs-on: ubuntu-latest

steps:
- uses: release-drafter/release-drafter@v6
with:
# TODO put branch name here
tag: "SONiC-${{ github.run_number }}"
version: "SONiC-${{ github.run_number }}"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
if: ${{ github.event_name == 'push' }}
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# SONiC Build repo for metal-stack.io

From: https://support.stordis.com/hc/en-us/articles/19994539796381-How-to-build-the-community-version-of-SONiC-Virtual-Switch-SONiC-VS-image

0 comments on commit 8e2092a

Please sign in to comment.