workflow
This commit is contained in:
Родитель
8cc7a153ab
Коммит
cfcad7112e
|
@ -0,0 +1,16 @@
|
|||
version: 2
|
||||
updates:
|
||||
- package-ecosystem: gomod
|
||||
directory: "/tools"
|
||||
schedule:
|
||||
interval: weekly
|
||||
open-pull-requests-limit: 10
|
||||
- package-ecosystem: gomod
|
||||
directory: "/"
|
||||
schedule:
|
||||
interval: weekly
|
||||
open-pull-requests-limit: 10
|
||||
- package-ecosystem: "github-actions"
|
||||
directory: "/"
|
||||
schedule:
|
||||
interval: weekly
|
|
@ -0,0 +1,70 @@
|
|||
---
|
||||
title: VM sizes
|
||||
description: Lists the different sizes available for virtual machines in Azure.
|
||||
author: lauradolan
|
||||
ms.service: virtual-machines
|
||||
ms.subservice: sizes
|
||||
ms.topic: conceptual
|
||||
ms.workload: infrastructure-services
|
||||
ms.date: 06/01/2022
|
||||
ms.author: ladolan
|
||||
---
|
||||
|
||||
# Sizes for virtual machines in Azure
|
||||
|
||||
**Applies to:** :heavy_check_mark: Linux VMs :heavy_check_mark: Windows VMs :heavy_check_mark: Flexible scale sets :heavy_check_mark: Uniform scale sets
|
||||
|
||||
> [!TIP]
|
||||
> Try the **[Virtual machines selector tool](https://aka.ms/vm-selector)** to find other sizes that best fit your workload.
|
||||
|
||||
This article describes the available sizes and options for the Azure virtual machines you can use to run your apps and workloads. It also provides deployment considerations to be aware of when you're planning to use these resources.
|
||||
|
||||
:::image type="content" source="media/sizes/azurevmsthumb.jpg" alt-text="YouTube video for selecting the right size for your VM." link="https://youtu.be/zOSvnJFd3ZM":::
|
||||
|
||||
| Type | Sizes | Description |
|
||||
|------|-------|-------------|
|
||||
| [General purpose](sizes-general.md) | B, Dsv3, Dv3, Dasv4, Dav4, DSv2, Dv2, Av2, DC, DCv2, Dv4, Dsv4, Ddv4, Ddsv4, Dv5, Dsv5, Ddv5, Ddsv5, Dasv5, Dadsv5 | Balanced CPU-to-memory ratio. Ideal for testing and development, small to medium databases, and low to medium traffic web servers. |
|
||||
| [Compute optimized](sizes-compute.md) | F, Fs, Fsv2, FX | High CPU-to-memory ratio. Good for medium traffic web servers, network appliances, batch processes, and application servers. |
|
||||
| [Memory optimized](sizes-memory.md) | Esv3, Ev3, Easv4, Eav4, Ebdsv5, Ebsv5, Ev4, Esv4, Edv4, Edsv4, Ev5, Esv5, Edv5, Edsv5, Easv5, Eadsv5, Mv2, M, DSv2, Dv2 | High memory-to-CPU ratio. Great for relational database servers, medium to large caches, and in-memory analytics. |
|
||||
| [Storage optimized](sizes-storage.md) | Lsv2, Lsv3, Lasv3 | High disk throughput and IO ideal for Big Data, SQL, NoSQL databases, data warehousing and large transactional databases. |
|
||||
| [GPU](sizes-gpu.md) | NC, NCv2, NCv3, NCasT4_v3, ND, NDv2, NV, NVv3, NVv4, NDasrA100_v4, NDm_A100_v4 | Specialized virtual machines targeted for heavy graphic rendering and video editing, as well as model training and inferencing (ND) with deep learning. Available with single or multiple GPUs. |
|
||||
| [High performance compute](sizes-hpc.md) | HB, HBv2, HBv3, HC, H | Our fastest and most powerful CPU virtual machines with optional high-throughput network interfaces (RDMA). |
|
||||
|
||||
- For information about pricing of the various sizes, see the pricing pages for [Linux](https://azure.microsoft.com/pricing/details/virtual-machines/#Linux) or [Windows](https://azure.microsoft.com/pricing/details/virtual-machines/Windows/#Windows).
|
||||
- For availability of VM sizes in Azure regions, see [Products available by region](https://azure.microsoft.com/regions/services/).
|
||||
- To see general limits on Azure VMs, see [Azure subscription and service limits, quotas, and constraints](../azure-resource-manager/management/azure-subscription-service-limits.md).
|
||||
- For more information on how Azure names its VMs, see [Azure virtual machine sizes naming conventions](./vm-naming-conventions.md).
|
||||
|
||||
## REST API
|
||||
|
||||
For information on using the REST API to query for VM sizes, see the following:
|
||||
|
||||
- [List available virtual machine sizes for resizing](/rest/api/compute/virtualmachines/listavailablesizes)
|
||||
- [List available virtual machine sizes for a subscription](/rest/api/compute/resourceskus/list)
|
||||
- [List available virtual machine sizes in an availability set](/rest/api/compute/availabilitysets/listavailablesizes)
|
||||
|
||||
## ACU
|
||||
|
||||
Learn more about how [Azure compute units (ACU)](acu.md) can help you compare compute performance across Azure SKUs.
|
||||
|
||||
## Benchmark scores
|
||||
|
||||
Learn more about compute performance for Linux VMs using the [CoreMark benchmark scores](./linux/compute-benchmark-scores.md).
|
||||
|
||||
Learn more about compute performance for Windows VMs using the [SPECInt benchmark scores](./windows/compute-benchmark-scores.md).
|
||||
|
||||
## Manage costs
|
||||
|
||||
[!INCLUDE [cost-management-horizontal](../../includes/cost-management-horizontal.md)]
|
||||
|
||||
## Next steps
|
||||
|
||||
Learn more about the different VM sizes that are available:
|
||||
|
||||
- [General purpose](sizes-general.md)
|
||||
- [Compute optimized](sizes-compute.md)
|
||||
- [Memory optimized](sizes-memory.md)
|
||||
- [Storage optimized](sizes-storage.md)
|
||||
- [GPU](sizes-gpu.md)
|
||||
- [High performance compute](sizes-hpc.md)
|
||||
- Check the [Previous generation](sizes-previous-gen.md) page for A Standard, Dv1 (D1-4 and D11-14 v1), and A8-A11 series
|
|
@ -0,0 +1,70 @@
|
|||
---
|
||||
title: VM sizes
|
||||
description: Lists the different sizes available for virtual machines in Azure.
|
||||
author: lauradolan
|
||||
ms.service: virtual-machines
|
||||
ms.subservice: sizes
|
||||
ms.topic: conceptual
|
||||
ms.workload: infrastructure-services
|
||||
ms.date: 06/01/2022
|
||||
ms.author: ladolan
|
||||
---
|
||||
|
||||
# Sizes for virtual machines in Azure
|
||||
|
||||
**Applies to:** :heavy_check_mark: Linux VMs :heavy_check_mark: Windows VMs :heavy_check_mark: Flexible scale sets :heavy_check_mark: Uniform scale sets
|
||||
|
||||
> [!TIP]
|
||||
> Try the **[Virtual machines selector tool](https://aka.ms/vm-selector)** to find other sizes that best fit your workload.
|
||||
|
||||
This article describes the available sizes and options for the Azure virtual machines you can use to run your apps and workloads. It also provides deployment considerations to be aware of when you're planning to use these resources.
|
||||
|
||||
:::image type="content" source="media/sizes/azurevmsthumb.jpg" alt-text="YouTube video for selecting the right size for your VM." link="https://youtu.be/zOSvnJFd3ZM":::
|
||||
|
||||
| Type | Sizes | Description |
|
||||
|------|-------|-------------|
|
||||
| [General purpose](sizes-general.md) | B, Dsv3, Dv3, Dasv4, Dav4, DSv2, Dv2, Av2, DC, DCv2, Dv4, Dsv4, Ddv4, Ddsv4, Dv5, Dsv5, Ddv5, Ddsv5, Dasv5, Dadsv5 | Balanced CPU-to-memory ratio. Ideal for testing and development, small to medium databases, and low to medium traffic web servers. |
|
||||
| [Compute optimized](sizes-compute.md) | F, Fs, Fsv2, FX | High CPU-to-memory ratio. Good for medium traffic web servers, network appliances, batch processes, and application servers. |
|
||||
| [Memory optimized](sizes-memory.md) | Esv3, Ev3, Easv4, Eav4, Ebdsv5, Ebsv5, Ev4, Esv4, Edv4, Edsv4, Ev5, Esv5, Edv5, Edsv5, Easv5, Eadsv5, Mv2, M, DSv2, Dv2 | High memory-to-CPU ratio. Great for relational database servers, medium to large caches, and in-memory analytics. |
|
||||
| [Storage optimized](sizes-storage.md) | Lsv2, Lsv3, Lasv3 | High disk throughput and IO ideal for Big Data, SQL, NoSQL databases, data warehousing and large transactional databases. |
|
||||
| [GPU](sizes-gpu.md) | NC, NCv2, NCv3, NCasT4_v3, ND, NDv2, NV, NVv3, NVv4, NDasrA100_v4, NDm_A100_v4 | Specialized virtual machines targeted for heavy graphic rendering and video editing, as well as model training and inferencing (ND) with deep learning. Available with single or multiple GPUs. |
|
||||
| [High performance compute](sizes-hpc.md) | HB, HBv2, HBv3, HC, H | Our fastest and most powerful CPU virtual machines with optional high-throughput network interfaces (RDMA). |
|
||||
|
||||
- For information about pricing of the various sizes, see the pricing pages for [Linux](https://azure.microsoft.com/pricing/details/virtual-machines/#Linux) or [Windows](https://azure.microsoft.com/pricing/details/virtual-machines/Windows/#Windows).
|
||||
- For availability of VM sizes in Azure regions, see [Products available by region](https://azure.microsoft.com/regions/services/).
|
||||
- To see general limits on Azure VMs, see [Azure subscription and service limits, quotas, and constraints](../azure-resource-manager/management/azure-subscription-service-limits.md).
|
||||
- For more information on how Azure names its VMs, see [Azure virtual machine sizes naming conventions](./vm-naming-conventions.md).
|
||||
|
||||
## REST API
|
||||
|
||||
For information on using the REST API to query for VM sizes, see the following:
|
||||
|
||||
- [List available virtual machine sizes for resizing](/rest/api/compute/virtualmachines/listavailablesizes)
|
||||
- [List available virtual machine sizes for a subscription](/rest/api/compute/resourceskus/list)
|
||||
- [List available virtual machine sizes in an availability set](/rest/api/compute/availabilitysets/listavailablesizes)
|
||||
|
||||
## ACU
|
||||
|
||||
Learn more about how [Azure compute units (ACU)](acu.md) can help you compare compute performance across Azure SKUs.
|
||||
|
||||
## Benchmark scores
|
||||
|
||||
Learn more about compute performance for Linux VMs using the [CoreMark benchmark scores](./linux/compute-benchmark-scores.md).
|
||||
|
||||
Learn more about compute performance for Windows VMs using the [SPECInt benchmark scores](./windows/compute-benchmark-scores.md).
|
||||
|
||||
## Manage costs
|
||||
|
||||
[!INCLUDE [cost-management-horizontal](../../includes/cost-management-horizontal.md)]
|
||||
|
||||
## Next steps
|
||||
|
||||
Learn more about the different VM sizes that are available:
|
||||
|
||||
- [General purpose](sizes-general.md)
|
||||
- [Compute optimized](sizes-compute.md)
|
||||
- [Memory optimized](sizes-memory.md)
|
||||
- [Storage optimized](sizes-storage.md)
|
||||
- [GPU](sizes-gpu.md)
|
||||
- [High performance compute](sizes-hpc.md)
|
||||
- Check the [Previous generation](sizes-previous-gen.md) page for A Standard, Dv1 (D1-4 and D11-14 v1), and A8-A11 series
|
|
@ -0,0 +1,35 @@
|
|||
name: build
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- master
|
||||
pull_request:
|
||||
branches:
|
||||
- master
|
||||
schedule:
|
||||
- cron: "0 0 * * *"
|
||||
|
||||
jobs:
|
||||
test:
|
||||
name: ${{ matrix.os }}
|
||||
runs-on: ${{ matrix.os }}
|
||||
strategy:
|
||||
matrix:
|
||||
os: [ubuntu-latest, windows-latest]
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v3
|
||||
- name: Set up Go
|
||||
uses: actions/setup-go@v3
|
||||
with:
|
||||
go-version: 1.18
|
||||
- name: Run tests
|
||||
run: make test
|
||||
- name: Run build
|
||||
run: make build
|
||||
- name: Upload Artifact
|
||||
uses: actions/upload-artifact@master
|
||||
with:
|
||||
name: tflint-ruleset-azurerm-ext-${{ matrix.os }}
|
||||
path: tflint-ruleset-azurerm-ext
|
|
@ -0,0 +1,35 @@
|
|||
name: build
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- master
|
||||
pull_request:
|
||||
branches:
|
||||
- master
|
||||
schedule:
|
||||
- cron: "0 0 * * *"
|
||||
|
||||
jobs:
|
||||
test:
|
||||
name: ${{ matrix.os }}
|
||||
runs-on: ${{ matrix.os }}
|
||||
strategy:
|
||||
matrix:
|
||||
os: [ubuntu-latest, windows-latest]
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v3
|
||||
- name: Set up Go
|
||||
uses: actions/setup-go@v3
|
||||
with:
|
||||
go-version: 1.18
|
||||
- name: Run tests
|
||||
run: make test
|
||||
- name: Run build
|
||||
run: make build
|
||||
- name: Upload Artifact
|
||||
uses: actions/upload-artifact@master
|
||||
with:
|
||||
name: tflint-ruleset-azurerm-ext-${{ matrix.os }}
|
||||
path: tflint-ruleset-azurerm-ext
|
|
@ -0,0 +1,42 @@
|
|||
name: e2e
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- master
|
||||
pull_request:
|
||||
branches:
|
||||
- master
|
||||
schedule:
|
||||
- cron: "0 0 * * *"
|
||||
|
||||
jobs:
|
||||
e2e:
|
||||
name: ${{ matrix.os }} (${{ matrix.version }})
|
||||
runs-on: ${{ matrix.os }}
|
||||
strategy:
|
||||
matrix:
|
||||
os: [ubuntu-latest, windows-latest]
|
||||
version: [v0.35.0, latest]
|
||||
env:
|
||||
TFLINT_VERSION: ${{ matrix.version }}
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v3
|
||||
- name: Set up Go
|
||||
uses: actions/setup-go@v3
|
||||
with:
|
||||
go-version: 1.18
|
||||
- name: Install TFLint
|
||||
run: curl -sL https://raw.githubusercontent.com/terraform-linters/tflint/master/install_linux.sh | bash
|
||||
- name: Install plugin (Linux)
|
||||
if: runner.os == 'Linux'
|
||||
run: make install
|
||||
- name: Install plugin (Windows)
|
||||
if: runner.os == 'Windows'
|
||||
run: |
|
||||
mkdir -p ~/.tflint.d/plugins
|
||||
go build -o ~/.tflint.d/plugins/tflint-ruleset-azurerm.exe
|
||||
shell: bash
|
||||
- name: Run E2E tests
|
||||
run: make e2e
|
|
@ -0,0 +1,42 @@
|
|||
name: e2e
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- master
|
||||
pull_request:
|
||||
branches:
|
||||
- master
|
||||
schedule:
|
||||
- cron: "0 0 * * *"
|
||||
|
||||
jobs:
|
||||
e2e:
|
||||
name: ${{ matrix.os }} (${{ matrix.version }})
|
||||
runs-on: ${{ matrix.os }}
|
||||
strategy:
|
||||
matrix:
|
||||
os: [ubuntu-latest, windows-latest]
|
||||
version: [v0.35.0, latest]
|
||||
env:
|
||||
TFLINT_VERSION: ${{ matrix.version }}
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v3
|
||||
- name: Set up Go
|
||||
uses: actions/setup-go@v3
|
||||
with:
|
||||
go-version: 1.18
|
||||
- name: Install TFLint
|
||||
run: curl -sL https://raw.githubusercontent.com/terraform-linters/tflint/master/install_linux.sh | bash
|
||||
- name: Install plugin (Linux)
|
||||
if: runner.os == 'Linux'
|
||||
run: make install
|
||||
- name: Install plugin (Windows)
|
||||
if: runner.os == 'Windows'
|
||||
run: |
|
||||
mkdir -p ~/.tflint.d/plugins
|
||||
go build -o ~/.tflint.d/plugins/tflint-ruleset-azurerm.exe
|
||||
shell: bash
|
||||
- name: Run E2E tests
|
||||
run: make e2e
|
|
@ -0,0 +1,19 @@
|
|||
name: generated-code
|
||||
|
||||
on: pull_request
|
||||
|
||||
jobs:
|
||||
checks:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v3
|
||||
with:
|
||||
submodules: true
|
||||
- name: Set up Go
|
||||
uses: actions/setup-go@v3
|
||||
with:
|
||||
go-version: 1.18
|
||||
- name: go run ./apispec-rule-gen
|
||||
working-directory: ./tools
|
||||
run: go run ./apispec-rule-gen && git diff --exit-code
|
|
@ -0,0 +1,19 @@
|
|||
name: generated-code
|
||||
|
||||
on: pull_request
|
||||
|
||||
jobs:
|
||||
checks:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v3
|
||||
with:
|
||||
submodules: true
|
||||
- name: Set up Go
|
||||
uses: actions/setup-go@v3
|
||||
with:
|
||||
go-version: 1.18
|
||||
- name: go run ./apispec-rule-gen
|
||||
working-directory: ./tools
|
||||
run: go run ./apispec-rule-gen && git diff --exit-code
|
|
@ -0,0 +1,27 @@
|
|||
name: goreleaser
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- master
|
||||
pull_request:
|
||||
branches:
|
||||
- master
|
||||
|
||||
jobs:
|
||||
check:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v3
|
||||
with:
|
||||
fetch-depth: 0
|
||||
- name: Set up Go
|
||||
uses: actions/setup-go@v3
|
||||
with:
|
||||
go-version: 1.18
|
||||
- name: Run GoReleaser
|
||||
uses: goreleaser/goreleaser-action@v3
|
||||
with:
|
||||
version: v0.178.0
|
||||
args: check
|
|
@ -0,0 +1,27 @@
|
|||
name: goreleaser
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- master
|
||||
pull_request:
|
||||
branches:
|
||||
- master
|
||||
|
||||
jobs:
|
||||
check:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v3
|
||||
with:
|
||||
fetch-depth: 0
|
||||
- name: Set up Go
|
||||
uses: actions/setup-go@v3
|
||||
with:
|
||||
go-version: 1.18
|
||||
- name: Run GoReleaser
|
||||
uses: goreleaser/goreleaser-action@v3
|
||||
with:
|
||||
version: v0.178.0
|
||||
args: check
|
|
@ -0,0 +1,24 @@
|
|||
name: lint
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- master
|
||||
pull_request:
|
||||
branches:
|
||||
- master
|
||||
|
||||
jobs:
|
||||
checks:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v3
|
||||
- name: Set up Go
|
||||
uses: actions/setup-go@v3
|
||||
with:
|
||||
go-version: 1.18
|
||||
- name: Run linters
|
||||
run: |
|
||||
export PATH=$PATH:$(go env GOPATH)/bin
|
||||
make tools lint
|
|
@ -0,0 +1,24 @@
|
|||
name: lint
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- master
|
||||
pull_request:
|
||||
branches:
|
||||
- master
|
||||
|
||||
jobs:
|
||||
checks:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v3
|
||||
- name: Set up Go
|
||||
uses: actions/setup-go@v3
|
||||
with:
|
||||
go-version: 1.18
|
||||
- name: Run linters
|
||||
run: |
|
||||
export PATH=$PATH:$(go env GOPATH)/bin
|
||||
make tools lint
|
|
@ -0,0 +1,32 @@
|
|||
on:
|
||||
push:
|
||||
branches: [ master ]
|
||||
schedule:
|
||||
- cron: "0 0 * * *"
|
||||
workflow_dispatch: # Enables on-demand/manual triggering
|
||||
jobs:
|
||||
job:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
with:
|
||||
submodules: true
|
||||
- uses: actions/setup-go@v3
|
||||
with:
|
||||
go-version: 1.18
|
||||
- run: |
|
||||
cd tools/apispec-rule-gen/schema
|
||||
terraform init -upgrade
|
||||
terraform providers schema -json > schema.json
|
||||
cd ../..
|
||||
git submodule update --remote
|
||||
go run ./apispec-rule-gen
|
||||
- uses: peter-evans/create-pull-request@v4
|
||||
with:
|
||||
commit-message: |
|
||||
autogenerated maintenance
|
||||
title: autogenerated maintenance
|
||||
delete-branch: true
|
||||
body: |
|
||||
If tests are stuck on https://github.com/peter-evans/create-pull-request/issues/48:
|
||||
["Manually close pull requests and immediately reopen them. This will enable `on: pull_request` workflows to run and be added as checks."](https://github.com/peter-evans/create-pull-request/blob/master/docs/concepts-guidelines.md#triggering-further-workflow-runs)
|
|
@ -0,0 +1,32 @@
|
|||
on:
|
||||
push:
|
||||
branches: [ master ]
|
||||
schedule:
|
||||
- cron: "0 0 * * *"
|
||||
workflow_dispatch: # Enables on-demand/manual triggering
|
||||
jobs:
|
||||
job:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
with:
|
||||
submodules: true
|
||||
- uses: actions/setup-go@v3
|
||||
with:
|
||||
go-version: 1.18
|
||||
- run: |
|
||||
cd tools/apispec-rule-gen/schema
|
||||
terraform init -upgrade
|
||||
terraform providers schema -json > schema.json
|
||||
cd ../..
|
||||
git submodule update --remote
|
||||
go run ./apispec-rule-gen
|
||||
- uses: peter-evans/create-pull-request@v4
|
||||
with:
|
||||
commit-message: |
|
||||
autogenerated maintenance
|
||||
title: autogenerated maintenance
|
||||
delete-branch: true
|
||||
body: |
|
||||
If tests are stuck on https://github.com/peter-evans/create-pull-request/issues/48:
|
||||
["Manually close pull requests and immediately reopen them. This will enable `on: pull_request` workflows to run and be added as checks."](https://github.com/peter-evans/create-pull-request/blob/master/docs/concepts-guidelines.md#triggering-further-workflow-runs)
|
|
@ -0,0 +1,28 @@
|
|||
name: release
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- '!*'
|
||||
tags:
|
||||
- v*.*.*
|
||||
|
||||
jobs:
|
||||
goreleaser:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v3
|
||||
with:
|
||||
fetch-depth: 0
|
||||
- name: Set up Go
|
||||
uses: actions/setup-go@v3
|
||||
with:
|
||||
go-version: 1.18
|
||||
- name: Run GoReleaser
|
||||
uses: goreleaser/goreleaser-action@v3
|
||||
with:
|
||||
version: v0.178.0
|
||||
args: release --rm-dist
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
@ -0,0 +1,28 @@
|
|||
name: release
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- '!*'
|
||||
tags:
|
||||
- v*.*.*
|
||||
|
||||
jobs:
|
||||
goreleaser:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v3
|
||||
with:
|
||||
fetch-depth: 0
|
||||
- name: Set up Go
|
||||
uses: actions/setup-go@v3
|
||||
with:
|
||||
go-version: 1.18
|
||||
- name: Run GoReleaser
|
||||
uses: goreleaser/goreleaser-action@v3
|
||||
with:
|
||||
version: v0.178.0
|
||||
args: release --rm-dist
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
@ -0,0 +1,47 @@
|
|||
name: watch
|
||||
|
||||
on:
|
||||
schedule:
|
||||
- cron: "0 0 * * *"
|
||||
|
||||
jobs:
|
||||
azure_docs:
|
||||
name: azure-docs
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v3
|
||||
- name: Calculate diff
|
||||
run: |
|
||||
curl https://raw.githubusercontent.com/MicrosoftDocs/azure-docs/master/articles/virtual-machines/sizes.md --output .github/snapshots/size.md
|
||||
git diff > snapshot.diff
|
||||
- name: Create an issue
|
||||
uses: actions/github-script@v6
|
||||
with:
|
||||
github-token: ${{secrets.GITHUB_TOKEN}}
|
||||
script: |
|
||||
const issues = await github.rest.issues.listForRepo({
|
||||
owner: 'terraform-linters',
|
||||
repo: 'tflint-ruleset-azurerm',
|
||||
state: 'open',
|
||||
labels: ['bot']
|
||||
})
|
||||
if (issues.data.length !== 0) {
|
||||
console.log("Issue already opened. Skipped.")
|
||||
return
|
||||
}
|
||||
|
||||
const fs = require('fs')
|
||||
const data = fs.readFileSync('snapshot.diff', 'utf-8')
|
||||
if (data === "") {
|
||||
console.log("No diff. Skipped.")
|
||||
return
|
||||
}
|
||||
|
||||
github.rest.issues.create({
|
||||
owner: 'terraform-linters',
|
||||
repo: 'tflint-ruleset-azurerm',
|
||||
title: '🤖 MicrosoftDocs/azure-docs Changes Report',
|
||||
body: "Changes found from the saved snapshots :eyes:\n\n```diff\n" + data + "```\n\nhttps://github.com/MicrosoftDocs/azure-docs/blob/master/articles/virtual-machines/sizes.md",
|
||||
labels: ['bot'],
|
||||
})
|
|
@ -0,0 +1,47 @@
|
|||
name: watch
|
||||
|
||||
on:
|
||||
schedule:
|
||||
- cron: "0 0 * * *"
|
||||
|
||||
jobs:
|
||||
azure_docs:
|
||||
name: azure-docs
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v3
|
||||
- name: Calculate diff
|
||||
run: |
|
||||
curl https://raw.githubusercontent.com/MicrosoftDocs/azure-docs/master/articles/virtual-machines/sizes.md --output .github/snapshots/size.md
|
||||
git diff > snapshot.diff
|
||||
- name: Create an issue
|
||||
uses: actions/github-script@v6
|
||||
with:
|
||||
github-token: ${{secrets.GITHUB_TOKEN}}
|
||||
script: |
|
||||
const issues = await github.rest.issues.listForRepo({
|
||||
owner: 'terraform-linters',
|
||||
repo: 'tflint-ruleset-azurerm',
|
||||
state: 'open',
|
||||
labels: ['bot']
|
||||
})
|
||||
if (issues.data.length !== 0) {
|
||||
console.log("Issue already opened. Skipped.")
|
||||
return
|
||||
}
|
||||
|
||||
const fs = require('fs')
|
||||
const data = fs.readFileSync('snapshot.diff', 'utf-8')
|
||||
if (data === "") {
|
||||
console.log("No diff. Skipped.")
|
||||
return
|
||||
}
|
||||
|
||||
github.rest.issues.create({
|
||||
owner: 'terraform-linters',
|
||||
repo: 'tflint-ruleset-azurerm',
|
||||
title: '🤖 MicrosoftDocs/azure-docs Changes Report',
|
||||
body: "Changes found from the saved snapshots :eyes:\n\n```diff\n" + data + "```\n\nhttps://github.com/MicrosoftDocs/azure-docs/blob/master/articles/virtual-machines/sizes.md",
|
||||
labels: ['bot'],
|
||||
})
|
|
@ -0,0 +1,31 @@
|
|||
# This is an example goreleaser.yaml file with some sane defaults.
|
||||
# Make sure to check the documentation at http://goreleaser.com
|
||||
env:
|
||||
- CGO_ENABLED=0
|
||||
builds:
|
||||
- targets:
|
||||
- darwin_amd64
|
||||
- darwin_arm64
|
||||
- linux_386
|
||||
- linux_amd64
|
||||
- linux_arm
|
||||
- linux_arm64
|
||||
- windows_386
|
||||
- windows_amd64
|
||||
archives:
|
||||
- id: zip
|
||||
name_template: "{{ .ProjectName }}_{{ .Os }}_{{ .Arch }}"
|
||||
format: zip
|
||||
files:
|
||||
- none*
|
||||
changelog:
|
||||
skip: true
|
||||
checksum:
|
||||
name_template: 'checksums.txt'
|
||||
release:
|
||||
github:
|
||||
owner: terraform-linters
|
||||
name: tflint-ruleset-azurerm-ext
|
||||
draft: true
|
||||
snapshot:
|
||||
name_template: "{{ .Tag }}-dev"
|
Загрузка…
Ссылка в новой задаче