Add System Info

This commit is contained in:
xopenwrt 2023-12-18 00:49:45 +08:00 committed by GitHub
parent 1ac17b567e
commit 8661af9d1c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 92 additions and 4 deletions

View File

@ -68,6 +68,8 @@ jobs:
echo "::set-output name=date::$(date +'%Y-%m-%d')"
echo "Release=${{ github.event.inputs.Release }}" >> $GITHUB_ENV
echo "SharePoint=${{ github.event.inputs.SharePoint }}" >> $GITHUB_ENV
echo "data2=$(date +'%Y-%m-%d')" >> $GITHUB_OUTPUT
echo "NOW_DATA_VERSION=v$(date +'%Y-%m-%d')" >> $GITHUB_ENV
if [ "${{ env.DELETE_USELESS_FILES }}" == true ]
then
docker rmi node:18 node:18-alpine node:16-alpine alpine:3.16 alpine:3.17 alpine:3.18 moby/buildkit:latest node:16 ubuntu:20.04 buildpack-deps:stretch buildpack-deps:buster buildpack-deps:bullseye debian:9 debian:10 debian:11
@ -85,6 +87,18 @@ jobs:
remove-android: 'true'
remove-haskell: 'true'
- name: Set env & Echo System Info
id: date2
run: |
export NOW_DATA_VERSION=${{env.NOW_DATA_VERSION}}
export GITHUB_WORKSPACE=$GITHUB_WORKSPACE
chmod +x $GITHUB_WORKSPACE/Scripts/AutoBuild_*.sh
source $GITHUB_WORKSPACE/Scripts/AutoBuild_Getenv.sh
Get_Action_Info
Get_Release_Info
- name: Checkout
uses: actions/checkout@main
with:

View File

@ -62,12 +62,21 @@ jobs:
Compile:
runs-on: self-hosted
steps:
- name: Get current date & Set env
- name: Set env & Echo System Info
id: date
run: |
echo "::set-output name=date::$(date +'%Y-%m-%d')"
echo "Release=${{ github.event.inputs.Release }}" >> $GITHUB_ENV
echo "SharePoint=${{ github.event.inputs.SharePoint }}" >> $GITHUB_ENV
echo "data2=$(date +'%Y-%m-%d')" >> $GITHUB_OUTPUT
echo "NOW_DATA_VERSION=v$(date +'%Y-%m-%d')" >> $GITHUB_ENV
export NOW_DATA_VERSION=${{env.NOW_DATA_VERSION}}
export GITHUB_WORKSPACE=$GITHUB_WORKSPACE
chmod +x $GITHUB_WORKSPACE/Scripts/AutoBuild_*.sh
source $GITHUB_WORKSPACE/Scripts/AutoBuild_Getenv.sh
if [ "${{ env.DELETE_USELESS_FILES }}" == true ]
then
docker rmi node:18 node:18-alpine node:16-alpine alpine:3.16 alpine:3.17 alpine:3.18 moby/buildkit:latest node:16 ubuntu:20.04 buildpack-deps:stretch buildpack-deps:buster buildpack-deps:bullseye debian:9 debian:10 debian:11
@ -75,6 +84,8 @@ jobs:
sudo -E apt-get -y autoremove --purge
sudo -E apt-get clean
fi
Get_Action_Info
Get_Release_Info
# - name: Maximize Build Space
# uses: easimon/maximize-build-space@master

View File

@ -71,12 +71,24 @@ jobs:
remove-android: 'true'
remove-haskell: 'true'
- name: Get current date & Set env
- name: Set env & Echo System Info
id: date
run: |
echo "::set-output name=date::$(date +'%Y-%m-%d')"
echo "Release=${{ github.event.inputs.Release }}" >> $GITHUB_ENV
echo "SharePoint=${{ github.event.inputs.SharePoint }}" >> $GITHUB_ENV
echo "data2=$(date +'%Y-%m-%d')" >> $GITHUB_OUTPUT
echo "NOW_DATA_VERSION=v$(date +'%Y-%m-%d')" >> $GITHUB_ENV
export NOW_DATA_VERSION=${{env.NOW_DATA_VERSION}}
export GITHUB_WORKSPACE=$GITHUB_WORKSPACE
chmod +x $GITHUB_WORKSPACE/Scripts/AutoBuild_*.sh
source $GITHUB_WORKSPACE/Scripts/AutoBuild_Getenv.sh
Get_Action_Info
Get_Release_Info
- name: Checkout
uses: actions/checkout@main
with:

View File

@ -70,12 +70,24 @@ jobs:
remove-dotnet: 'true'
remove-android: 'true'
- name: Get current date & Set env
- name: Set env & Echo System Info
id: date
run: |
echo "::set-output name=date::$(date +'%Y-%m-%d')"
echo "Release=${{ github.event.inputs.Release }}" >> $GITHUB_ENV
echo "SharePoint=${{ github.event.inputs.SharePoint }}" >> $GITHUB_ENV
echo "data2=$(date +'%Y-%m-%d')" >> $GITHUB_OUTPUT
echo "NOW_DATA_VERSION=v$(date +'%Y-%m-%d')" >> $GITHUB_ENV
export NOW_DATA_VERSION=${{env.NOW_DATA_VERSION}}
export GITHUB_WORKSPACE=$GITHUB_WORKSPACE
chmod +x $GITHUB_WORKSPACE/Scripts/AutoBuild_*.sh
source $GITHUB_WORKSPACE/Scripts/AutoBuild_Getenv.sh
Get_Action_Info
Get_Release_Info
- name: Checkout
uses: actions/checkout@main
with:

View File

@ -62,12 +62,20 @@ jobs:
Compile:
runs-on: self-hosted
steps:
- name: Get current date & Set env
- name: Set env & Echo System Info
id: date
run: |
echo "::set-output name=date::$(date +'%Y-%m-%d')"
echo "Release=${{ github.event.inputs.Release }}" >> $GITHUB_ENV
echo "SharePoint=${{ github.event.inputs.SharePoint }}" >> $GITHUB_ENV
echo "data2=$(date +'%Y-%m-%d')" >> $GITHUB_OUTPUT
echo "NOW_DATA_VERSION=v$(date +'%Y-%m-%d')" >> $GITHUB_ENV
export NOW_DATA_VERSION=${{env.NOW_DATA_VERSION}}
export GITHUB_WORKSPACE=$GITHUB_WORKSPACE
chmod +x $GITHUB_WORKSPACE/Scripts/AutoBuild_*.sh
source $GITHUB_WORKSPACE/Scripts/AutoBuild_Getenv.sh
if [ "${{ env.DELETE_USELESS_FILES }}" == true ]
then
docker rmi node:18 node:18-alpine node:16-alpine alpine:3.16 alpine:3.17 alpine:3.18 moby/buildkit:latest node:16 ubuntu:20.04 buildpack-deps:stretch buildpack-deps:buster buildpack-deps:bullseye debian:9 debian:10 debian:11
@ -75,6 +83,8 @@ jobs:
sudo -E apt-get -y autoremove --purge
sudo -E apt-get clean
fi
Get_Action_Info
Get_Release_Info
# - name: Maximize Build Space
# uses: easimon/maximize-build-space@master

View File

@ -0,0 +1,29 @@
#!/bin/bash
# AutoBuild Module by Xinb/Xinbyte <https://github.com/xopenwrt/X-OpenWrt-New>
# AutoBuild Functions
Get_Action_Info() {
echo "---------------------------- Soc Info | 🏅AMD Yes ----------------------------"
lscpu | grep "Model name"
lscpu | grep "CPU(s)"
echo "--------------------------------- Memory Info --------------------------------"
free -m
echo "---------------------------------- Disk Info ---------------------------------"
lsblk
echo "------------------------------- Disk Usage Info ------------------------------"
df -h
# Get IP Info
echo "------------------------------- IP Address Info ------------------------------"
IP=`curl ip.115115.xyz -s`
curl ip.115115.xyz -s
curl -s https://searchplugin.csdn.net/api/v1/ip/get?ip=${IP} | jq -r .data.address
}
Get_Release_Info() {
echo "------------------------------- Build Version Data ----------------------------"
echo ${NOW_DATA_VERSION}
echo "------------------------------ Build Kernel Version ---------------------------"
`cat ${OPENWRT_BUILD_DIR}/target/linux/x86/Makefile | grep KERNEL_PATCHVER:=`
}