virtualization updated #198
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: Microsoft Dev Box CI | |
| # Run when commits are pushed to main | |
| on: | |
| workflow_dispatch: | |
| push: | |
| branches: | |
| - main | |
| - feature/* | |
| - bugfix/* | |
| - hotfix/* | |
| - release/* | |
| # Set up permissions for deploying with secretless Azure federated credentials | |
| # https://learn.microsoft.com/en-us/azure/developer/github/connect-from-azure?tabs=azure-portal%2Clinux#set-up-azure-login-with-openid-connect-authentication | |
| permissions: | |
| id-token: write | |
| contents: read | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Update Packages | |
| run: sudo apt-get update #&& sudo apt-get upgrade -y | |
| shell: bash | |
| - name: Install Bicep | |
| run: | | |
| # Fetch the latest Bicep CLI binary | |
| curl -Lo bicep https://github.com/Azure/bicep/releases/latest/download/bicep-linux-x64 | |
| # Mark it as executable | |
| chmod +x ./bicep | |
| # Add bicep to your PATH (requires admin) | |
| sudo mv ./bicep /usr/local/bin/bicep | |
| # Verify you can now access the 'bicep' command | |
| bicep --help | |
| shell: bash | |
| - name: Install Azure CLI | |
| run: | | |
| curl -sL https://aka.ms/InstallAzureCLIDeb | sudo bash | |
| shell: bash | |
| - name: Install Azure Developer CLI | |
| run: | | |
| curl -fsSL https://aka.ms/install-azd.sh | bash | |
| shell: bash | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Build Solution | |
| run: | | |
| sudo mkdir ./infra/bin | |
| sudo chmod -R 777 ./infra/bin | |
| az bicep build --file ./infra/main.bicep --outdir ./infra/bin | |
| shell: bash |