Add config management commands (show, edit, set) #1472
Workflow file for this run
This file contains hidden or 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: porter | |
| on: | |
| push: | |
| branches: | |
| - main | |
| pull_request: | |
| branches: | |
| - main | |
| paths-ignore: | |
| - 'docs/**' | |
| env: | |
| GOVERSION: 1.24.11 | |
| permissions: | |
| contents: read | |
| jobs: | |
| Build: | |
| name: Native Compile | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: checkout | |
| uses: actions/checkout@v6 | |
| - uses: actions/setup-go@v6 | |
| with: | |
| go-version: "${{ env.GOVERSION }}" # The Go version to download (if necessary) and use. | |
| cache: true | |
| - run: go version | |
| - name: Native Build | |
| run: go run mage.go build | |
| shell: bash | |
| - name: Check if all doc changes have been pushed | |
| run: | | |
| if [ "$(git status --porcelain docs/)" ]; | |
| then | |
| echo "There are changes to the documentation that have not been pushed! Please push the following files after build" | |
| git status -s docs/ | |
| exit 1 | |
| else | |
| echo "All documentation changes have been pushed" | |
| fi | |
| shell: bash | |
| - name: Publish Native Binaries | |
| uses: actions/[email protected] | |
| with: | |
| name: build-bin | |
| path: "${{ github.workspace }}/bin" | |
| XBuild: | |
| name: Cross Compile | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: checkout | |
| uses: actions/checkout@v6 | |
| - uses: actions/setup-go@v6 | |
| with: | |
| go-version: "${{ env.GOVERSION }}" # The Go version to download (if necessary) and use. | |
| cache: true | |
| - run: go version | |
| - name: Cross Compile | |
| run: go run mage.go -v XBuildAll | |
| shell: bash | |
| - name: Publish Release Binaries | |
| uses: actions/[email protected] | |
| with: | |
| name: xbuild-bin | |
| path: "${{ github.workspace }}/bin" | |
| Unit_test: | |
| name: Unit Test | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: checkout | |
| uses: actions/checkout@v6 | |
| - uses: actions/setup-go@v6 | |
| with: | |
| go-version: "${{ env.GOVERSION }}" # The Go version to download (if necessary) and use. | |
| cache: true | |
| - run: go version | |
| - name: Unit Test | |
| run: go run mage.go -v TestUnit | |
| shell: bash | |
| VetLint: | |
| name: Vet and Lint | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: checkout | |
| uses: actions/checkout@v6 | |
| - uses: actions/setup-go@v6 | |
| with: | |
| go-version: "${{ env.GOVERSION }}" # The Go version to download (if necessary) and use. | |
| cache: true | |
| - run: go version | |
| - name: Vet | |
| run: go run mage.go Vet | |
| shell: bash | |
| - name: Lint | |
| run: go run mage.go Lint | |
| shell: bash | |
| Build-docker-images: | |
| name: Build Docker Images | |
| needs: | |
| - XBuild | |
| runs-on: ubuntu-latest | |
| if: success() | |
| steps: | |
| - name: checkout | |
| uses: actions/checkout@v6 | |
| - uses: actions/setup-go@v6 | |
| with: | |
| go-version: "${{ env.GOVERSION }}" # The Go version to download (if necessary) and use. | |
| cache: true | |
| - run: go version | |
| - name: Download Cross-Compiled Porter Binaries | |
| uses: actions/[email protected] | |
| with: | |
| name: xbuild-bin | |
| path: bin | |
| - name: Setup Bin | |
| run: go run mage.go UseXBuildBinaries | |
| - name: Build Docker Images | |
| run: go run mage.go BuildImages | |
| Smoke-test: | |
| name: Smoke Test | |
| needs: | |
| - XBuild | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: checkout | |
| uses: actions/checkout@v6 | |
| - name: Download Cross-Compiled Porter Binaries | |
| uses: actions/[email protected] | |
| with: | |
| name: xbuild-bin | |
| path: bin | |
| - uses: actions/setup-go@v6 | |
| with: | |
| go-version: "${{ env.GOVERSION }}" # The Go version to download (if necessary) and use. | |
| cache: true | |
| - run: go version | |
| - name: Setup Bin | |
| run: go run mage.go UseXBuildBinaries | |
| - name: Aggressive cleanup | |
| run: | | |
| df -h | |
| # Remove Java (JDKs) | |
| sudo rm -rf /usr/lib/jvm | |
| # Remove .NET SDKs | |
| sudo rm -rf /usr/share/dotnet | |
| # Remove Swift toolchain | |
| sudo rm -rf /usr/share/swift | |
| # Remove Haskell (GHC) | |
| sudo rm -rf /usr/local/.ghcup | |
| # Remove Julia | |
| sudo rm -rf /usr/local/julia* | |
| # Remove Android SDKs | |
| sudo rm -rf /usr/local/lib/android | |
| # Remove Chromium (optional if not using for browser tests) | |
| sudo rm -rf /usr/local/share/chromium | |
| # Remove Microsoft/Edge and Google Chrome builds | |
| sudo rm -rf /opt/microsoft /opt/google | |
| # Remove Azure CLI | |
| sudo rm -rf /opt/az | |
| # Remove PowerShell | |
| sudo rm -rf /usr/local/share/powershell | |
| df -h | |
| - name: Run Smoke Tests | |
| run: go run mage.go -v TestSmoke |