Merge pull request #39 from open-traffic-generator/dev-ospfv2 #301
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: Build | |
on: | |
push: | |
pull_request: | |
workflow_dispatch: | |
paths: | |
- "!artifacts/**" | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout Repository | |
uses: actions/checkout@v2 | |
with: | |
ref: ${{ github.head_ref }} | |
- name: Set up Python 3.10 | |
uses: actions/setup-python@v2 | |
with: | |
python-version: "3.10" | |
- name: Install dependencies | |
run: | | |
pip install -r requirements.txt | |
- name: Setup GO | |
uses: actions/setup-go@v2 | |
with: | |
go-version: 1.22.2 | |
- name: Make all targets | |
run: | | |
make generate | |
- name: Upload artifacts | |
uses: actions/upload-artifact@v4 | |
with: | |
path: artifacts | |
- name: Commit artifacts | |
run: | | |
git config user.name "Github Actions Bot" | |
git config user.email "[email protected]" | |
git add -f artifacts/open-traffic-generator-port.txt | |
git add -f artifacts/open-traffic-generator-bgp.txt | |
git add -f artifacts/open-traffic-generator-isis.txt | |
git add -f artifacts/open-traffic-generator-flow.txt | |
git add -f artifacts/open-traffic-generator-discovery.txt | |
git add -f artifacts/open-traffic-generator-lag.txt | |
git add -f artifacts/open-traffic-generator-lacp.txt | |
git add -f artifacts/open-traffic-generator-rsvp.txt | |
git add -f artifacts/open-traffic-generator-lldp.txt | |
git add -f artifacts/open-traffic-generator-dhcpv4client.txt | |
git add -f artifacts/open-traffic-generator-dhcpv4server.txt | |
git add -f artifacts/open-traffic-generator-dhcpv6client.txt | |
git add -f artifacts/open-traffic-generator-dhcpv6server.txt | |
git add -f artifacts/open-traffic-generator-platform.txt | |
git add -f artifacts/open-traffic-generator-ospfv2.txt | |
if git status --porcelain | grep . | |
then | |
git commit -m "Update auto generated content" | |
git push | |
else | |
echo "No changed auto generated content" | |
fi |