Com o seguinte exemplo de fluxo de trabalho do Github Actions, você cria imagens personalizadas com seu aplicativo e as distribui usando serviços de gerenciamento de imagem do Azure como Galeria de imagens compartilhada Depois você pode usar essas imagens para criarMáquinas virtuais ouConjuntos de escala de máquina virtual 😎
name: Build App Node Image (Azure) on: release: types: - created jobs: BUILD-APP-NODE-IMAGE: runs-on: ubuntu-latest steps: - name: CHECKOUT uses: actions/checkout@v2 - name: WORKFLOW ARTIFACTS run:| cd "$GITHUB_WORKSPACE" mkdir workflow-artifacts/ cp -r dist workflow-artifacts/dist cp install.sh workflow-artifacts/install.sh - name: AZURE LOGIN uses: azure/login@v1 with: creds: ${{secrets.AZURE_CREDENTIALS}} - name: BUILD VM IMAGE uses: azure/build-vm-image@v0 with: resource-group-name: 'MyApp' managed-identity: 'myapp-imagebuilder' location: 'westeurope' vm-size: 'Standard_D4s_v3' source-os-type: 'linux' source-image: Canonical:0001-com-ubuntu-server-focal:20_04-lts:latest customizer-source: ${{ GITHUB.WORKSPACE }}/workflow-artifacts customizer-script:| sudo mkdir -p /var/www/myapp sudo cp -r /tmp/workflow-artifacts/* /var/www/myapp/ cd /var/www/myapp/ sudo ./install.sh dist-type: 'SharedImageGallery' dist-resource-id: '/subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/MyApp/providers/Microsoft.Compute/galleries/MyAppImageGallery/images/myapp-node' dist-location: 'westeurope'