Update CI-master_tests.yml
This commit is contained in:
parent
3dd9088b81
commit
72a979b029
253
.github/workflows/CI-master_tests.yml
vendored
253
.github/workflows/CI-master_tests.yml
vendored
@ -8,10 +8,8 @@ on:
|
|||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
|
|
||||||
Build_and_test_winpeas_master:
|
Build_and_test_winpeas_master:
|
||||||
runs-on: windows-latest
|
runs-on: windows-latest
|
||||||
needs: Build_test_and_release_linpeas_master
|
|
||||||
|
|
||||||
# environment variables
|
# environment variables
|
||||||
env:
|
env:
|
||||||
@ -46,8 +44,8 @@ jobs:
|
|||||||
run: msbuild $env:Solution_Path
|
run: msbuild $env:Solution_Path
|
||||||
|
|
||||||
# Execute all unit tests in the solution
|
# Execute all unit tests in the solution
|
||||||
- name: Execute unit tests
|
#- name: Execute unit tests
|
||||||
run: dotnet test $env:Solution_Path
|
# run: dotnet test $env:Solution_Path
|
||||||
|
|
||||||
# Build & update all versions
|
# Build & update all versions
|
||||||
- name: Build all versions
|
- name: Build all versions
|
||||||
@ -92,147 +90,290 @@ jobs:
|
|||||||
cp $env:DotFuscatorGeneratedPath\x64\winPEASx64.exe "winPEAS\winPEASexe\binaries\Obfuscated Releases\winPEASx64.exe"
|
cp $env:DotFuscatorGeneratedPath\x64\winPEASx64.exe "winPEAS\winPEASexe\binaries\Obfuscated Releases\winPEASx64.exe"
|
||||||
cp $env:DotFuscatorGeneratedPath\x86\winPEASx86.exe "winPEAS\winPEASexe\binaries\Obfuscated Releases\winPEASx86.exe"
|
cp $env:DotFuscatorGeneratedPath\x86\winPEASx86.exe "winPEAS\winPEASexe\binaries\Obfuscated Releases\winPEASx86.exe"
|
||||||
cp $env:DotFuscatorGeneratedPath\any\winPEASany.exe "winPEAS\winPEASexe\binaries\Obfuscated Releases\winPEASany.exe"
|
cp $env:DotFuscatorGeneratedPath\any\winPEASany.exe "winPEAS\winPEASexe\binaries\Obfuscated Releases\winPEASany.exe"
|
||||||
# Git add
|
|
||||||
- name: Create local changes
|
|
||||||
run: |
|
|
||||||
git add winPEAS\winPEASexe\binaries\Release\*
|
|
||||||
git add winPEAS\winPEASexe\binaries\x64\*
|
|
||||||
git add winPEAS\winPEASexe\binaries\x86\*
|
|
||||||
git add "winPEAS\winPEASexe\binaries\Obfuscated Releases\*.exe"
|
|
||||||
# Git commit
|
|
||||||
- name: Commit results to Github
|
|
||||||
run: |
|
|
||||||
git config --local user.email "ci@winpeas.com"
|
|
||||||
git config --global user.name "CI-winpeas"
|
|
||||||
git pull origin "${{ github.ref }}" --autostash --rebase -Xours
|
|
||||||
git commit -m "winpeas binaries auto update" -a --allow-empty
|
|
||||||
|
|
||||||
# Git push
|
# Upload all the versions for the release
|
||||||
- name: Push changes
|
- name: Upload winpeasx64
|
||||||
uses: ad-m/github-push-action@master
|
uses: actions/upload-artifact@v2
|
||||||
with:
|
with:
|
||||||
branch: refs/heads/${{ github.head_ref }}
|
name: winpeasx64
|
||||||
github_token: ${{ secrets.GITHUB_TOKEN }}
|
path: winPEAS\winPEASexe\binaries\x64\Release\winPEASx64.exe
|
||||||
force: true
|
|
||||||
|
|
||||||
Build_test_and_release_linpeas_master:
|
- name: Upload winpeasx86
|
||||||
|
uses: actions/upload-artifact@v2
|
||||||
|
with:
|
||||||
|
name: winpeasx86
|
||||||
|
path: winPEAS\winPEASexe\binaries\x86\Release\winPEASx86.exe
|
||||||
|
|
||||||
|
- name: Upload winpeasany
|
||||||
|
uses: actions/upload-artifact@v2
|
||||||
|
with:
|
||||||
|
name: winpeasany
|
||||||
|
path: winPEAS\winPEASexe\binaries\Release\winPEASany.exe
|
||||||
|
|
||||||
|
- name: Upload winpeasx64ofs
|
||||||
|
uses: actions/upload-artifact@v2
|
||||||
|
with:
|
||||||
|
name: winpeasx64ofs
|
||||||
|
path: winPEAS\winPEASexe\binaries\Obfuscated Releases\winPEASx64.exe
|
||||||
|
|
||||||
|
- name: Upload winpeasx86ofs
|
||||||
|
uses: actions/upload-artifact@v2
|
||||||
|
with:
|
||||||
|
name: winpeasx86ofs
|
||||||
|
path: winPEAS\winPEASexe\binaries\Obfuscated Releases\winPEASx86.exe
|
||||||
|
|
||||||
|
- name: Upload winpeasanyofs
|
||||||
|
uses: actions/upload-artifact@v2
|
||||||
|
with:
|
||||||
|
name: winpeasanyofs
|
||||||
|
path: winPEAS\winPEASexe\binaries\Obfuscated Releases\winPEASany.exe
|
||||||
|
|
||||||
|
# Git add
|
||||||
|
#- name: Create local changes
|
||||||
|
# run: |
|
||||||
|
# git add winPEAS\winPEASexe\binaries\Release\*
|
||||||
|
# git add winPEAS\winPEASexe\binaries\x64\*
|
||||||
|
# git add winPEAS\winPEASexe\binaries\x86\*
|
||||||
|
# git add "winPEAS\winPEASexe\binaries\Obfuscated Releases\*.exe"
|
||||||
|
# Git commit
|
||||||
|
#- name: Commit results to Github
|
||||||
|
# run: |
|
||||||
|
# git config --local user.email "ci@winpeas.com"
|
||||||
|
# git config --global user.name "CI-winpeas"
|
||||||
|
# git pull origin "${{ github.ref }}" --autostash --rebase -Xours
|
||||||
|
# git commit -m "winpeas binaries auto update" -a --allow-empty
|
||||||
|
# Git push
|
||||||
|
#- name: Push changes
|
||||||
|
# uses: ad-m/github-push-action@master
|
||||||
|
# with:
|
||||||
|
# branch: refs/heads/${{ github.head_ref }}
|
||||||
|
# github_token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
# force: true
|
||||||
|
|
||||||
|
Build_and_test_linpeas_master:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
|
# Download repo
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v2
|
||||||
with:
|
with:
|
||||||
ref: ${{ github.head_ref }}
|
ref: ${{ github.head_ref }}
|
||||||
|
|
||||||
|
# Setup go
|
||||||
- uses: actions/setup-go@v2
|
- uses: actions/setup-go@v2
|
||||||
with:
|
with:
|
||||||
go-version: 1.17.0-rc1
|
go-version: 1.17.0-rc1
|
||||||
stable: false
|
stable: false
|
||||||
- run: go version
|
- run: go version
|
||||||
|
|
||||||
|
# Build linpeas
|
||||||
- name: Build linpeas
|
- name: Build linpeas
|
||||||
run: |
|
run: |
|
||||||
python3 -m pip install PyYAML
|
python3 -m pip install PyYAML
|
||||||
cd linPEAS
|
cd linPEAS
|
||||||
python3 -m builder.linpeas_builder
|
python3 -m builder.linpeas_builder
|
||||||
|
|
||||||
|
# Build linpeas binaries
|
||||||
- name: Build linpeas binaries
|
- name: Build linpeas binaries
|
||||||
run: |
|
run: |
|
||||||
git clone https://github.com/carlospolop/sh2bin
|
git clone https://github.com/carlospolop/sh2bin
|
||||||
cd sh2bin
|
cd sh2bin
|
||||||
bash build.sh ../linPEAS/linpeas.sh
|
bash build.sh ../linPEAS/linpeas.sh
|
||||||
cd ..
|
|
||||||
rm -rf sh2bin
|
|
||||||
|
|
||||||
|
# Run linpeas help as quick test
|
||||||
- name: Run linpeas help
|
- name: Run linpeas help
|
||||||
run: linPEAS/linpeas.sh -h
|
run: linPEAS/linpeas.sh -h
|
||||||
|
|
||||||
|
# Run linpeas as a test
|
||||||
#- name: Run linpeas
|
#- name: Run linpeas
|
||||||
# run: linPEAS/linpeas.sh -t
|
# run: linPEAS/linpeas.sh -t
|
||||||
|
|
||||||
# Upload files
|
# Upload files for release
|
||||||
|
|
||||||
- name: Upload linpeas.sh
|
- name: Upload linpeas.sh
|
||||||
uses: actions/upload-artifact@v2
|
uses: actions/upload-artifact@v2
|
||||||
with:
|
with:
|
||||||
name: linpeas.sh
|
name: linpeas.sh
|
||||||
path: linPEAS/linpeas.sh
|
path: linPEAS/linpeas.sh
|
||||||
|
|
||||||
# Linux bins
|
## Linux bins
|
||||||
|
- name: Upload linpeas_linux_386
|
||||||
- name: Upload sh2bin_linux_386
|
|
||||||
uses: actions/upload-artifact@v2
|
uses: actions/upload-artifact@v2
|
||||||
with:
|
with:
|
||||||
name: linpeas_linux_386
|
name: linpeas_linux_386
|
||||||
path: sh2bin/builds/sh2bin_linux_386
|
path: sh2bin/builds/sh2bin_linux_386
|
||||||
|
|
||||||
- name: Upload sh2bin_linux_amd64
|
- name: Upload linpeas_linux_amd64
|
||||||
uses: actions/upload-artifact@v2
|
uses: actions/upload-artifact@v2
|
||||||
with:
|
with:
|
||||||
name: linpeas_linux_amd64
|
name: linpeas_linux_amd64
|
||||||
path: sh2bin/builds/sh2bin_linux_amd64
|
path: sh2bin/builds/sh2bin_linux_amd64
|
||||||
|
|
||||||
- name: Upload sh2bin_linux_arm
|
- name: Upload linpeas_linux_arm
|
||||||
uses: actions/upload-artifact@v2
|
uses: actions/upload-artifact@v2
|
||||||
with:
|
with:
|
||||||
name: linpeas_linux_arm
|
name: linpeas_linux_arm
|
||||||
path: sh2bin/builds/sh2bin_linux_arm
|
path: sh2bin/builds/sh2bin_linux_arm
|
||||||
|
|
||||||
- name: Upload sh2bin_linux_arm64
|
- name: Upload linpeas_linux_arm64
|
||||||
uses: actions/upload-artifact@v2
|
uses: actions/upload-artifact@v2
|
||||||
with:
|
with:
|
||||||
name: linpeas_linux_arm64
|
name: linpeas_linux_arm64
|
||||||
path: sh2bin/builds/sh2bin_linux_arm64
|
path: sh2bin/builds/sh2bin_linux_arm64
|
||||||
|
|
||||||
# Darwin bins
|
## Darwin bins
|
||||||
|
- name: Upload linpeas_darwin_386
|
||||||
- name: Upload sh2bin_darwin_386
|
|
||||||
uses: actions/upload-artifact@v2
|
uses: actions/upload-artifact@v2
|
||||||
with:
|
with:
|
||||||
name: linpeas_darwin_386
|
name: linpeas_darwin_386
|
||||||
path: sh2bin/builds/sh2bin_darwin_386
|
path: sh2bin/builds/sh2bin_darwin_386
|
||||||
|
|
||||||
- name: Upload sh2bin_darwin_amd64
|
- name: Upload linpeas_darwin_amd64
|
||||||
uses: actions/upload-artifact@v2
|
uses: actions/upload-artifact@v2
|
||||||
with:
|
with:
|
||||||
name: linpeas_darwin_amd64
|
name: linpeas_darwin_amd64
|
||||||
path: sh2bin/builds/sh2bin_darwin_amd64
|
path: sh2bin/builds/sh2bin_darwin_amd64
|
||||||
|
|
||||||
- name: Upload sh2bin_darwin_arm
|
- name: Upload linpeas_darwin_arm
|
||||||
uses: actions/upload-artifact@v2
|
uses: actions/upload-artifact@v2
|
||||||
with:
|
with:
|
||||||
name: linpeas_darwin_arm
|
name: linpeas_darwin_arm
|
||||||
path: sh2bin/builds/sh2bin_darwin_arm
|
path: sh2bin/builds/sh2bin_darwin_arm
|
||||||
|
|
||||||
- name: Upload sh2bin_darwin_arm64
|
- name: Upload linpeas_darwin_arm64
|
||||||
uses: actions/upload-artifact@v2
|
uses: actions/upload-artifact@v2
|
||||||
with:
|
with:
|
||||||
name: linpeas_darwin_arm64
|
name: linpeas_darwin_arm64
|
||||||
path: sh2bin/builds/sh2bin_darwin_arm64
|
path: sh2bin/builds/sh2bin_darwin_arm64
|
||||||
|
|
||||||
- name: Create local changes
|
# Clean sh2bin repo
|
||||||
run: git add linPEAS/.
|
- name: Cleaning sh2bin
|
||||||
|
run: rm -rf sh2bin
|
||||||
|
|
||||||
- name: Commit results to Github
|
# - name: Create local changes
|
||||||
run: |
|
# run: git add linPEAS/linpeas.sh
|
||||||
git config --local user.email ""
|
# - name: Commit results to Github
|
||||||
git config --global user.name "CI-linpeas-ubuntu"
|
# run: |
|
||||||
git pull origin "${{ github.ref }}" --autostash --rebase -Xours
|
# git config --local user.email ""
|
||||||
git commit -m "linpeas.sh auto update" -a --allow-empty
|
# git config --global user.name "CI-linpeas-ubuntu"
|
||||||
|
# git pull origin "${{ github.ref }}" --autostash --rebase -Xours
|
||||||
|
# git commit -m "linpeas.sh auto update" -a --allow-empty
|
||||||
|
# - name: Push changes
|
||||||
|
# uses: ad-m/github-push-action@master
|
||||||
|
# with:
|
||||||
|
# branch: ${{ github.head_ref }}
|
||||||
|
# github_token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
# force: true
|
||||||
|
|
||||||
- name: Push changes
|
Publish_release:
|
||||||
uses: ad-m/github-push-action@master
|
runs-on: ubuntu-latest
|
||||||
|
needs: [Build_and_test_winpeas_master,Build_and_test_linpeas_master]
|
||||||
|
|
||||||
|
steps:
|
||||||
|
# Download files to release
|
||||||
|
- name: Download winpeasx64
|
||||||
|
uses: actions/download-artifact@v2
|
||||||
with:
|
with:
|
||||||
branch: ${{ github.head_ref }}
|
name: winpeasx64
|
||||||
github_token: ${{ secrets.GITHUB_TOKEN }}
|
|
||||||
force: true
|
- name: Download winpeasx86
|
||||||
|
uses: actions/download-artifact@v2
|
||||||
|
with:
|
||||||
|
name: winpeasx86
|
||||||
|
|
||||||
|
- name: Download winpeasany
|
||||||
|
uses: actions/download-artifact@v2
|
||||||
|
with:
|
||||||
|
name: winpeasany
|
||||||
|
|
||||||
|
- name: Download winpeasx64ofs
|
||||||
|
uses: actions/download-artifact@v2
|
||||||
|
with:
|
||||||
|
name: winpeasx64ofs
|
||||||
|
|
||||||
|
- name: Download winpeasx86ofs
|
||||||
|
uses: actions/download-artifact@v2
|
||||||
|
with:
|
||||||
|
name: winpeasx86ofs
|
||||||
|
|
||||||
|
- name: Download winpeasanyofs
|
||||||
|
uses: actions/download-artifact@v2
|
||||||
|
with:
|
||||||
|
name: winpeasanyofs
|
||||||
|
|
||||||
|
- name: Download linpeas.sh
|
||||||
|
uses: actions/download-artifact@v2
|
||||||
|
with:
|
||||||
|
name: linpeas.sh
|
||||||
|
|
||||||
|
- name: Download linpeas_linux_386
|
||||||
|
uses: actions/download-artifact@v2
|
||||||
|
with:
|
||||||
|
name: linpeas_linux_386
|
||||||
|
|
||||||
|
- name: Download linpeas_linux_amd64
|
||||||
|
uses: actions/download-artifact@v2
|
||||||
|
with:
|
||||||
|
name: linpeas_linux_amd64
|
||||||
|
|
||||||
|
- name: Download linpeas_linux_arm
|
||||||
|
uses: actions/download-artifact@v2
|
||||||
|
with:
|
||||||
|
name: linpeas_linux_arm
|
||||||
|
|
||||||
|
- name: Download linpeas_linux_arm64
|
||||||
|
uses: actions/download-artifact@v2
|
||||||
|
with:
|
||||||
|
name: linpeas_linux_arm64
|
||||||
|
|
||||||
|
- name: Download linpeas_darwin_386
|
||||||
|
uses: actions/download-artifact@v2
|
||||||
|
with:
|
||||||
|
name: linpeas_darwin_386
|
||||||
|
|
||||||
|
- name: Download linpeas_darwin_amd64
|
||||||
|
uses: actions/download-artifact@v2
|
||||||
|
with:
|
||||||
|
name: linpeas_darwin_amd64
|
||||||
|
|
||||||
|
- name: Download linpeas_darwin_arm
|
||||||
|
uses: actions/download-artifact@v2
|
||||||
|
with:
|
||||||
|
name: linpeas_darwin_arm
|
||||||
|
|
||||||
|
- name: Download linpeas_darwin_arm64
|
||||||
|
uses: actions/download-artifact@v2
|
||||||
|
with:
|
||||||
|
name: linpeas_darwin_arm64
|
||||||
|
|
||||||
|
# Create the release
|
||||||
|
- name: Create Release
|
||||||
|
id: create_release
|
||||||
|
uses: actions/create-release@v1
|
||||||
|
env:
|
||||||
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
with:
|
||||||
|
tag_name: ${{ github.ref }}
|
||||||
|
release_name: Release ${{ github.ref }}
|
||||||
|
draft: false
|
||||||
|
prerelease: false
|
||||||
|
|
||||||
|
- id: upload_release_assets
|
||||||
|
uses: dwenegar/upload-release-assets@v1
|
||||||
|
with:
|
||||||
|
release_id: ${{ steps.create_release.outputs.id }}
|
||||||
|
assets_path: .
|
||||||
|
env:
|
||||||
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
|
||||||
|
|
||||||
Build_and_test_macpeas_master:
|
Build_and_test_macpeas_master:
|
||||||
runs-on: macos-latest
|
runs-on: macos-latest
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
|
# Download repo
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v2
|
||||||
|
|
||||||
|
# Build linpeas
|
||||||
- name: Build macpeas
|
- name: Build macpeas
|
||||||
run: |
|
run: |
|
||||||
python3 -m pip install PyYAML
|
python3 -m pip install PyYAML
|
||||||
@ -240,8 +381,10 @@ jobs:
|
|||||||
cd linPEAS
|
cd linPEAS
|
||||||
python3 -m builder.linpeas_builder
|
python3 -m builder.linpeas_builder
|
||||||
|
|
||||||
|
# Run linpeas help as quick test
|
||||||
- name: Run macpeas help
|
- name: Run macpeas help
|
||||||
run: linPEAS/linpeas.sh -h
|
run: linPEAS/linpeas.sh -h
|
||||||
|
|
||||||
|
# Run macpeas parts to test it
|
||||||
- name: Run macpeas
|
- name: Run macpeas
|
||||||
run: linPEAS/linpeas.sh -o system_information,container,procs_crons_timers_srvcs_sockets,network_information,users_information,software_information
|
run: linPEAS/linpeas.sh -o system_information,container,procs_crons_timers_srvcs_sockets,network_information,users_information,software_information
|
||||||
|
Loading…
Reference in New Issue
Block a user