feat: New Module avm/res/network/public-ip-prefix
#3142
Workflow file for this run
This file contains 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: On pull request | |
on: | |
pull_request: | |
branches: | |
- main | |
jobs: | |
get-module-to-validate: | |
uses: ./.github/workflows/get-changed-module.yml | |
validate-module-files: | |
runs-on: ubuntu-latest | |
needs: get-module-to-validate | |
if: needs.get-module-to-validate.outputs.module_dir | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
- name: Setup .NET | |
uses: actions/setup-dotnet@v3 | |
with: | |
dotnet-version: 7.0.x | |
# Adding a step to explicitly install the latest Bicep CLI because there is | |
# always a delay in updating Bicep CLI in the job runner environments. | |
- name: Install the latest Bicep CLI | |
run: | | |
curl -Lo bicep https://github.com/Azure/bicep/releases/latest/download/bicep-linux-x64 | |
chmod +x ./bicep | |
sudo mv ./bicep /usr/local/bin/bicep | |
bicep --version | |
- name: Install Bicep registry module tool | |
run: dotnet tool install --global Azure.Bicep.RegistryModuleTool | |
- name: Validate module files | |
run: brm validate | |
working-directory: ${{ needs.get-module-to-validate.outputs.module_dir }} | |
- run: mv ${{ needs.get-module-to-validate.outputs.module_dir }}/main.json ${{ needs.get-module-to-validate.outputs.module_dir }}/mainTemplate.json | |
- name: Run ARM-TTK (optional) | |
uses: microsoft/action-armttk@v1 | |
continue-on-error: true | |
with: | |
workdir: "${{ needs.get-module-to-validate.outputs.module_dir }}" | |
shellcheck: | |
name: runner | |
runs-on: ubuntu-latest | |
needs: get-module-to-validate | |
if: needs.get-module-to-validate.outputs.module_dir | |
steps: | |
- uses: actions/checkout@v4 | |
- name: shellcheck | |
uses: reviewdog/action-shellcheck@v1 | |
continue-on-error: true | |
with: | |
github_token: ${{ secrets.PAT || github.token }} | |
reporter: github-pr-review # Change reporter. | |
path: ${{ needs.get-module-to-validate.outputs.module_dir }} | |
validate-non-module-files: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
- name: Setup Node.js | |
uses: actions/setup-node@v3 | |
with: | |
node-version: "16" | |
- name: Install packages | |
run: npm ci | |
- name: Lint | |
run: npm run lint | |
- name: Check formatting | |
run: npm run prettier:check |