From 9c0e78221667fe2e6c9e78f8eb8a70ac268ffe98 Mon Sep 17 00:00:00 2001 From: Tobias Wolf Date: Tue, 21 Jan 2025 09:05:29 +0100 Subject: [PATCH] Replace upstream build workflow Signed-off-by: Tobias Wolf --- .../add-waiting-response-on-fail.yaml | 39 -------- .../auto-assign-reviewers-to-pr.yaml | 55 ------------ .../automation-open-pull-request-go-sdk.yaml | 31 ------- .../automation-open-pull-request-pandora.yaml | 29 ------ .../workflows/breaking-change-detection.yaml | 29 ------ .github/workflows/comment-failure.yaml | 26 ------ .github/workflows/comment-stale-prs.yaml | 29 ------ .github/workflows/depscheck.yaml | 30 ------- .github/workflows/document-lint.yaml | 31 ------- .github/workflows/gencheck.yaml | 33 ------- .github/workflows/golint.yaml | 36 -------- .github/workflows/gradually-deprecated.yaml | 31 ------- .github/workflows/increment-milestone.yaml | 22 ----- .github/workflows/issue-comment-created.yaml | 40 --------- .github/workflows/issue-opened.yaml | 20 ----- .github/workflows/link-milestone.yaml | 28 ------ .github/workflows/lock.yaml | 27 ------ .github/workflows/milestone-closed.yaml | 21 ----- .github/workflows/mkdocs.yaml | 28 ------ .github/workflows/on-push-tag.yml | 39 ++++++++ .github/workflows/provider-test.yaml | 88 ------------------- .../workflows/pull-request-new-commit.yaml | 15 ---- .../pull-request-reviewed-workflow.yaml | 55 ------------ .github/workflows/pull-request-reviewed.yaml | 39 -------- .github/workflows/pull-request-type.yaml | 20 ----- .github/workflows/pull-request.yaml | 30 ------- .github/workflows/release.yaml | 56 ------------ .github/workflows/remove-issue-label.yml | 50 ----------- .github/workflows/save-artifacts.yaml | 21 ----- .github/workflows/static-analysis.yaml | 28 ------ .github/workflows/teamcity-test.yaml | 36 -------- .github/workflows/tflint.yaml | 35 -------- .github/workflows/thirty-two-bit.yaml | 35 -------- .github/workflows/unit-test.yaml | 37 -------- .github/workflows/validate-examples.yaml | 35 -------- .github/workflows/website-lint.yaml | 31 ------- 36 files changed, 39 insertions(+), 1196 deletions(-) delete mode 100644 .github/workflows/add-waiting-response-on-fail.yaml delete mode 100644 .github/workflows/auto-assign-reviewers-to-pr.yaml delete mode 100644 .github/workflows/automation-open-pull-request-go-sdk.yaml delete mode 100644 .github/workflows/automation-open-pull-request-pandora.yaml delete mode 100644 .github/workflows/breaking-change-detection.yaml delete mode 100644 .github/workflows/comment-failure.yaml delete mode 100644 .github/workflows/comment-stale-prs.yaml delete mode 100644 .github/workflows/depscheck.yaml delete mode 100644 .github/workflows/document-lint.yaml delete mode 100644 .github/workflows/gencheck.yaml delete mode 100644 .github/workflows/golint.yaml delete mode 100644 .github/workflows/gradually-deprecated.yaml delete mode 100644 .github/workflows/increment-milestone.yaml delete mode 100644 .github/workflows/issue-comment-created.yaml delete mode 100644 .github/workflows/issue-opened.yaml delete mode 100644 .github/workflows/link-milestone.yaml delete mode 100644 .github/workflows/lock.yaml delete mode 100644 .github/workflows/milestone-closed.yaml delete mode 100644 .github/workflows/mkdocs.yaml create mode 100644 .github/workflows/on-push-tag.yml delete mode 100644 .github/workflows/provider-test.yaml delete mode 100644 .github/workflows/pull-request-new-commit.yaml delete mode 100644 .github/workflows/pull-request-reviewed-workflow.yaml delete mode 100644 .github/workflows/pull-request-reviewed.yaml delete mode 100644 .github/workflows/pull-request-type.yaml delete mode 100644 .github/workflows/pull-request.yaml delete mode 100644 .github/workflows/release.yaml delete mode 100644 .github/workflows/remove-issue-label.yml delete mode 100644 .github/workflows/save-artifacts.yaml delete mode 100644 .github/workflows/static-analysis.yaml delete mode 100644 .github/workflows/teamcity-test.yaml delete mode 100644 .github/workflows/tflint.yaml delete mode 100644 .github/workflows/thirty-two-bit.yaml delete mode 100644 .github/workflows/unit-test.yaml delete mode 100644 .github/workflows/validate-examples.yaml delete mode 100644 .github/workflows/website-lint.yaml diff --git a/.github/workflows/add-waiting-response-on-fail.yaml b/.github/workflows/add-waiting-response-on-fail.yaml deleted file mode 100644 index 388056b3d5dd..000000000000 --- a/.github/workflows/add-waiting-response-on-fail.yaml +++ /dev/null @@ -1,39 +0,0 @@ ---- -name: Add waiting-response on failures - -on: - workflow_run: - workflows: ['Check for new usages of deprecated functionality', 'GoLang Linting', 'Website Linting', 'Generation Check', 'Validate Examples', 'Unit Tests', 'Terraform Schema Linting', '32 Bit Build', 'Provider Tests', 'Vendor Dependencies Check'] - types: [completed] - -permissions: - pull-requests: write - -jobs: - add-waiting-response-on-fail: - runs-on: ubuntu-latest - if: ${{ github.event.workflow_run.conclusion == 'failure' }} - steps: - - name: Get Artifact - id: get_artifact - uses: dawidd6/action-download-artifact@09f2f74827fd3a8607589e5ad7f9398816f540fe # v3.1.4 - with: - github_token: ${{secrets.GITHUB_TOKEN}} - run_id: ${{ github.event.workflow_run.id }} - - - name: env_vars - id: env_vars - run: | - echo "ghrepo=$(cat artifact/ghrepo.txt)" >>${GITHUB_OUTPUT} - echo "ghowner=$(cat artifact/ghowner.txt)" >>${GITHUB_OUTPUT} - echo "prnumber=$(cat artifact/prnumber.txt)" >>${GITHUB_OUTPUT} - - name: Add waiting-response on fail - uses: actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea # v7.0.1 - with: - script: | - github.rest.issues.addLabels({ - issue_number: ${{ steps.env_vars.outputs.prnumber }}, - owner: "${{ steps.env_vars.outputs.ghowner }}", - repo: "${{ steps.env_vars.outputs.ghrepo }}", - labels: ["waiting-response"] - }) diff --git a/.github/workflows/auto-assign-reviewers-to-pr.yaml b/.github/workflows/auto-assign-reviewers-to-pr.yaml deleted file mode 100644 index c9dc9341d4b5..000000000000 --- a/.github/workflows/auto-assign-reviewers-to-pr.yaml +++ /dev/null @@ -1,55 +0,0 @@ -name: Assign Reviewer as Assignee - -on: - workflow_run: - workflows: - - "Pull Request Reviewed" - types: - - completed - -permissions: - issues: write - pull-requests: write - -jobs: - assign_reviewer: - runs-on: ubuntu-latest - steps: - - name: Get Artifact - id: get_artifact - continue-on-error: true - uses: dawidd6/action-download-artifact@09f2f74827fd3a8607589e5ad7f9398816f540fe # v3.1.4 - with: - github_token: ${{secrets.GITHUB_TOKEN}} - workflow: pull-request-reviewed.yaml - - - name: env_vars - id: env_vars - if: steps.get_artifact.outcome == 'success' - run: | - echo "reviewer=$(cat artifact/reviewer.txt)" >>${GITHUB_OUTPUT} - echo "reviewState=$(cat artifact/reviewstate.txt)" >>${GITHUB_OUTPUT} - echo "prNumber=$(cat artifact/prnumber.txt)" >>${GITHUB_OUTPUT} - - - name: Assign the reviewer as assignee when changes are requested - uses: actions/github-script@d7906e4ad0b1822421a7e6a35d5ca353c962f410 # v6.4.1 - with: - github-token: ${{ secrets.GITHUB_TOKEN }} - script: | - const reviewer = '${{ steps.env_vars.outputs.reviewer }}'; - const prNumber = parseInt('${{ steps.env_vars.outputs.prNumber }}', 10); - const reviewState = '${{ steps.env_vars.outputs.reviewState }}'; - const repo = '${{ github.event.repository.name }}'; - const owner = '${{ github.event.repository.owner.login }}'; - - if (reviewState === 'changes_requested') { - console.log(`Assigning reviewer: ${reviewer} to PR #${prNumber} as changes were requested.`); - await github.rest.issues.addAssignees({ - owner: owner, - repo: repo, - issue_number: prNumber, - assignees: [reviewer], - }); - } else { - console.log(`No action taken. Review state is '${reviewState}'.`); - } \ No newline at end of file diff --git a/.github/workflows/automation-open-pull-request-go-sdk.yaml b/.github/workflows/automation-open-pull-request-go-sdk.yaml deleted file mode 100644 index 9de98d375d2d..000000000000 --- a/.github/workflows/automation-open-pull-request-go-sdk.yaml +++ /dev/null @@ -1,31 +0,0 @@ ---- -name: Open Pull Request when an `auto-pr` is pushed for go-azure-sdk - -on: - push: - branches: - - 'auto-deps-pr/updating-go-azure-sdk-to-**' - -jobs: - open-pull-request: - runs-on: ubuntu-latest - permissions: - contents: read - steps: - - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 - - - name: "open a pull request" - id: open-pr - run: | - version="$(echo $GH_REF | sed "s/auto-deps-pr\/updating-go-azure-sdk-to-//")" - title="dependencies: updating \`hashicorp/go-azure-sdk\` to \`${version}\`" - body="This PR updates \`hashicorp/go-azure-sdk\` to \`${version}\` - further details can be found in a comment." - - # this runs everytime the PR gets pushed too, whilst you can only create a PR a single time - # so we should be smarter, but piping this to /dev/null is a fine workaround for MVP - gh pr create --title "$title" --body "$body" -B "$PR_TARGET" > /dev/null - - env: - PR_TARGET: "main" - GH_TOKEN: ${{ secrets.SERVICE_ACCOUNT_TERRAFORM_TOKEN }} - GH_REF: ${{ github.ref_name }} diff --git a/.github/workflows/automation-open-pull-request-pandora.yaml b/.github/workflows/automation-open-pull-request-pandora.yaml deleted file mode 100644 index 23d5670f3c4a..000000000000 --- a/.github/workflows/automation-open-pull-request-pandora.yaml +++ /dev/null @@ -1,29 +0,0 @@ ---- -name: Open Pull Request when an `auto-pr` is pushed for Pandora - -on: - push: - branches: - - 'auto-pr/**' # deprecated - - 'auto-pandora-pr/**' - -jobs: - open-pull-request: - runs-on: ubuntu-latest - permissions: - contents: read - steps: - - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 - - - name: "open a pull request" - id: open-pr - run: | - # this runs everytime the PR gets pushed too, whilst you can only create a PR a single time - # so we should be smarter, but piping this to /dev/null is a fine workaround for MVP - gh pr create --title "$PR_TITLE" --body "$PR_BODY" -B "$PR_TARGET" > /dev/null - - env: - PR_TITLE: "Auto PR: Regenerating based on (${{ github.sha }})" - PR_BODY: "Regenerating the Terraform Provider based on the latest changes" - PR_TARGET: "main" - GH_TOKEN: ${{ secrets.SERVICE_ACCOUNT_TERRAFORM_TOKEN }} diff --git a/.github/workflows/breaking-change-detection.yaml b/.github/workflows/breaking-change-detection.yaml deleted file mode 100644 index 15d82f2a5339..000000000000 --- a/.github/workflows/breaking-change-detection.yaml +++ /dev/null @@ -1,29 +0,0 @@ ---- -name: Breaking Schema Changes - -permissions: - contents: read - pull-requests: read - - -on: - pull_request: - types: ['opened', 'synchronize'] - paths: - - '.github/workflows/breaking-change-detection.yaml' - - 'vendor/**' - - 'internal/**.go' - -concurrency: - group: 'breakingChange-${{ github.head_ref }}' - cancel-in-progress: true - -jobs: - detect: - runs-on: custom-linux-small - steps: - - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 - - uses: actions/setup-go@3041bf56c941b39c61721a86cd11f3bb1338122a # v5.2.0 - with: - go-version-file: ./.go-version - - run: bash ./scripts/run-breaking-change-detection.sh diff --git a/.github/workflows/comment-failure.yaml b/.github/workflows/comment-failure.yaml deleted file mode 100644 index e486554e9e97..000000000000 --- a/.github/workflows/comment-failure.yaml +++ /dev/null @@ -1,26 +0,0 @@ -name: Comment Failure - -on: - # This file is reused, and called from other workflows - workflow_call: - -jobs: - comment-failure: - runs-on: ubuntu-latest - steps: - - name: Get run url - if: failure() - run: | - echo "gha_url=https://github.com/${{github.repository}}/actions/runs/${{github.run_id}}" >> $GITHUB_ENV - - name: Send build failure comment - if: failure() - uses: actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea # v7.0.1 - with: - result-encoding: string - script: | - github.rest.issues.createComment({ - issue_number: ${{ github.event.number }}, - owner: context.repo.owner, - repo: context.repo.repo, - body: 'Build failure \n\n This pull request contains a build failure which needs addressed [here](${{ env.gha_url}}) .' - }) \ No newline at end of file diff --git a/.github/workflows/comment-stale-prs.yaml b/.github/workflows/comment-stale-prs.yaml deleted file mode 100644 index b701de95c865..000000000000 --- a/.github/workflows/comment-stale-prs.yaml +++ /dev/null @@ -1,29 +0,0 @@ -name: 'Comment stale PRs' -on: - schedule: - - cron: '0 6 * * MON' - -permissions: - issues: write - pull-requests: write - -jobs: - comment-stale-prs: - runs-on: ubuntu-latest - steps: - - uses: actions/stale@28ca1036281a5e5922ead5184a1bbf96e5fc984e # v9.0.0 - with: - stale-pr-message: | - This PR is being labeled as "stale" because it has not been updated for 30 or more days. - - If this PR is still valid, please remove the "stale" label. If this PR is blocked, please add it to the "Blocked" milestone. - - If you need some help completing this PR, please leave a comment letting us know. Thank you! - stale-pr-label: 'stale' - only-labels: 'waiting-response' - exempt-pr-labels: 'breaking-change,upstream/microsoft,upstream/pandora,upstream/terraform' - days-before-pr-stale: 30 - days-before-pr-close: -1 - days-before-issue-stale: -1 - exempt-pr-milestones: 'Blocked' - start-date: '2023-07-07T00:00:00Z' diff --git a/.github/workflows/depscheck.yaml b/.github/workflows/depscheck.yaml deleted file mode 100644 index d4aebc5c0e1f..000000000000 --- a/.github/workflows/depscheck.yaml +++ /dev/null @@ -1,30 +0,0 @@ ---- -name: Vendor Dependencies Check - -permissions: - contents: read - -on: - pull_request: - types: ['opened', 'synchronize'] - paths: - - '.github/workflows/depscheck.yaml' - - 'vendor/**' - - '**.go' - -jobs: - depscheck: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 - - uses: actions/setup-go@3041bf56c941b39c61721a86cd11f3bb1338122a # v5.2.0 - with: - go-version-file: ./.go-version - - run: bash scripts/gogetcookie.sh - - run: make depscheck - save-artifacts-on-fail: - if: ${{ needs.depscheck.result }} == 'failure' - uses: ./.github/workflows/save-artifacts.yaml - comment-on-fail: - if: ${{ needs.depscheck.result }} == 'failure' - uses: ./.github/workflows/comment-failure.yaml diff --git a/.github/workflows/document-lint.yaml b/.github/workflows/document-lint.yaml deleted file mode 100644 index 9c2ba9b2e274..000000000000 --- a/.github/workflows/document-lint.yaml +++ /dev/null @@ -1,31 +0,0 @@ ---- -name: Resource Document Linting - -permissions: - contents: read - pull-requests: read - -on: - pull_request: - types: ["opened", "synchronize"] - paths: - - ".github/workflows/document-lint.yaml" - - "internal/services/**" - - "website/**" - branches: ["main"] - -jobs: - document-lint: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 - - uses: actions/setup-go@3041bf56c941b39c61721a86cd11f3bb1338122a # v5.2.0 - with: - go-version-file: ./.go-version - - run: bash scripts/gogetcookie.sh - - run: make document-lint - continue-on-error: true - - name: check lint result - if: failure() - run: | - echo "::warning::Document linting failed. Please fix the issues." \ No newline at end of file diff --git a/.github/workflows/gencheck.yaml b/.github/workflows/gencheck.yaml deleted file mode 100644 index 5e7a31bf0751..000000000000 --- a/.github/workflows/gencheck.yaml +++ /dev/null @@ -1,33 +0,0 @@ ---- -name: Generation Check - -permissions: - contents: read - -on: - pull_request: - types: ['opened', 'synchronize'] - paths: - - '.github/workflows/gencheck.yaml' - - '**.go' - -concurrency: - group: 'gencheck-${{ github.head_ref }}' - cancel-in-progress: true - -jobs: - gencheck: - runs-on: custom-linux-large - steps: - - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 - - uses: actions/setup-go@3041bf56c941b39c61721a86cd11f3bb1338122a # v5.2.0 - with: - go-version-file: ./.go-version - - run: bash scripts/gogetcookie.sh - - run: make gencheck - save-artifacts-on-fail: - if: ${{ needs.gencheck.result }} == 'failure' - uses: ./.github/workflows/save-artifacts.yaml - comment-on-fail: - if: ${{ needs.depscheck.result }} == 'failure' - uses: ./.github/workflows/comment-failure.yaml diff --git a/.github/workflows/golint.yaml b/.github/workflows/golint.yaml deleted file mode 100644 index 467fdf19ec9b..000000000000 --- a/.github/workflows/golint.yaml +++ /dev/null @@ -1,36 +0,0 @@ ---- -name: GoLang Linting - -permissions: - contents: read - -on: - pull_request: - types: ['opened', 'synchronize'] - paths: - - '.github/workflows/golint.yaml' - - 'vendor/**' - - '**.go' - -concurrency: - group: 'golint-${{ github.head_ref }}' - cancel-in-progress: true - -jobs: - golint: - runs-on: custom-linux-large - steps: - - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 - - uses: actions/setup-go@3041bf56c941b39c61721a86cd11f3bb1338122a # v5.2.0 - with: - go-version-file: ./.go-version - - uses: golangci/golangci-lint-action@971e284b6050e8a5849b72094c50ab08da042db8 # v6.1.1 - with: - version: 'v1.61.0' - args: -v ./internal/... - save-artifacts-on-fail: - if: ${{ needs.golint.result }} == 'failure' - uses: ./.github/workflows/save-artifacts.yaml - comment-on-fail: - if: ${{ needs.depscheck.result }} == 'failure' - uses: ./.github/workflows/comment-failure.yaml diff --git a/.github/workflows/gradually-deprecated.yaml b/.github/workflows/gradually-deprecated.yaml deleted file mode 100644 index a1ee181a146e..000000000000 --- a/.github/workflows/gradually-deprecated.yaml +++ /dev/null @@ -1,31 +0,0 @@ ---- -name: Check for new usages of deprecated functionality - -permissions: - contents: read - -on: - pull_request: - types: ['opened', 'synchronize'] - paths: - - '.github/workflows/gradually-deprecated.yaml' - - './scripts/run-gradually-deprecated.sh' - - '**.go' - -jobs: - test: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 - with: - fetch-depth: 0 - - uses: actions/setup-go@3041bf56c941b39c61721a86cd11f3bb1338122a # v5.2.0 - with: - go-version-file: ./.go-version - - run: bash ./scripts/run-gradually-deprecated.sh - save-artifacts-on-fail: - if: ${{ needs.test.result }} == 'failure' - uses: ./.github/workflows/save-artifacts.yaml - comment-on-fail: - if: ${{ needs.depscheck.result }} == 'failure' - uses: ./.github/workflows/comment-failure.yaml diff --git a/.github/workflows/increment-milestone.yaml b/.github/workflows/increment-milestone.yaml deleted file mode 100644 index e641b0b66d62..000000000000 --- a/.github/workflows/increment-milestone.yaml +++ /dev/null @@ -1,22 +0,0 @@ ---- -name: Increment Milestone - -on: - push: - tags: - - 'v*.*.*' - -permissions: - issues: write - contents: read - -jobs: - increment-milestone: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 - with: - fetch-depth: 0 - - name: "Increment Milestone" - shell: bash - run: bash ./scripts/increment-milestone.sh -u https://api.github.com/repos${{ github.owner }}/${{ github.repository }}/milestones -r ${{github.ref_name}} -t ${{secrets.GITHUB_TOKEN}} \ No newline at end of file diff --git a/.github/workflows/issue-comment-created.yaml b/.github/workflows/issue-comment-created.yaml deleted file mode 100644 index 61351f48c1b2..000000000000 --- a/.github/workflows/issue-comment-created.yaml +++ /dev/null @@ -1,40 +0,0 @@ ---- -name: Issue Comment Created Triage - -on: - issue_comment: - types: [created] - -permissions: - pull-requests: write - issues: write - -jobs: - remove-stale: - uses: ./.github/workflows/remove-issue-label.yml - with: - label-name: "stale" - remove-waiting-response-from-issue: - uses: ./.github/workflows/remove-issue-label.yml - if: ${{ !github.event.issue.pull_request }} - with: - label-name: "waiting-response" - remove-waiting-response-from-pr: - uses: ./.github/workflows/remove-issue-label.yml - if: (github.event.issue.pull_request && github.actor == github.event.issue.user.login) - with: - label-name: "waiting-response" - - pull_request_comment: - runs-on: ubuntu-latest - if: github.event.issue.pull_request && endsWith(github.event.comment.body, '/wr') - steps: - - uses: actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea # v7.0.1 - with: - script: | - github.rest.issues.addLabels({ - issue_number: context.issue.number, - owner: context.repo.owner, - repo: context.repo.repo, - labels: ["waiting-response"] - }) \ No newline at end of file diff --git a/.github/workflows/issue-opened.yaml b/.github/workflows/issue-opened.yaml deleted file mode 100644 index f48dc263a8ab..000000000000 --- a/.github/workflows/issue-opened.yaml +++ /dev/null @@ -1,20 +0,0 @@ ---- -name: Issue Opened Triage - -permissions: - issues: write - -on: - issues: - types: [opened] - -jobs: - issue_triage: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 - - uses: github/issue-labeler@c1b0f9f52a63158c4adc09425e858e87b32e9685 # v3.4 - with: - repo-token: "${{ secrets.GITHUB_TOKEN }}" - configuration-path: .github/labeler-issue-triage.yml - enable-versioned-regex: 0 diff --git a/.github/workflows/link-milestone.yaml b/.github/workflows/link-milestone.yaml deleted file mode 100644 index 6f4229752796..000000000000 --- a/.github/workflows/link-milestone.yaml +++ /dev/null @@ -1,28 +0,0 @@ ---- -name: Link Milestone - -on: - pull_request_target: - branches: [main] - types: ['closed'] - -jobs: - link-milestone: - if: github.event.pull_request.merged == true - runs-on: ubuntu-latest - permissions: - contents: read - pull-requests: write - issues: write - steps: - - uses: actions/setup-go@3041bf56c941b39c61721a86cd11f3bb1338122a # v5.2.0 - with: - # we cannot use go-version-file here because no repositories are checked out so there is no file to reference - go-version: '1.22.7' - - run: | - go install github.com/stephybun/link-milestone@latest - link-milestone - env: - PR_NUMBER: ${{ github.event.number }} - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - GITHUB_REPO: ${{ github.repository }} diff --git a/.github/workflows/lock.yaml b/.github/workflows/lock.yaml deleted file mode 100644 index 93b3a958ebd8..000000000000 --- a/.github/workflows/lock.yaml +++ /dev/null @@ -1,27 +0,0 @@ ---- -name: 'Lock Threads' - -on: - schedule: - - cron: '50 1 * * *' - -jobs: - lock: - permissions: - issues: write - pull-requests: write - runs-on: ubuntu-latest - steps: - - uses: dessant/lock-threads@1bf7ec25051fe7c00bdd17e6a7cf3d7bfb7dc771 # v5.0.1 - with: - github-token: ${{ github.token }} - issue-comment: > - I'm going to lock this issue because it has been closed for _30 days_ ⏳. This helps our maintainers find and focus on the active issues. - - If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further. - issue-inactive-days: '30' - pr-comment: > - I'm going to lock this pull request because it has been closed for _30 days_ ⏳. This helps our maintainers find and focus on the active contributions. - - If you have found a problem that seems related to this change, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further. - pr-inactive-days: '30' diff --git a/.github/workflows/milestone-closed.yaml b/.github/workflows/milestone-closed.yaml deleted file mode 100644 index 3e68525a0a11..000000000000 --- a/.github/workflows/milestone-closed.yaml +++ /dev/null @@ -1,21 +0,0 @@ ---- -name: Closed Milestones - -on: - milestone: - types: [closed] - -permissions: - issues: write - pull-requests: write - -jobs: - Comment: - runs-on: ubuntu-latest - steps: - - uses: bflad/action-milestone-comment@ae6c9fdf5778064d4e09b4632604a16b7289096c # v1.0.2 - with: - body: | - This functionality has been released in [${{ github.event.milestone.title }} of the Terraform Provider](https://github.com/${{ github.repository }}/blob/${{ github.event.milestone.title }}/CHANGELOG.md). Please see the [Terraform documentation on provider versioning](https://www.terraform.io/docs/configuration/providers.html#provider-versions) or reach out if you need any assistance upgrading. - - For further feature requests or bug reports with this functionality, please create a [new GitHub issue](https://github.com/${{ github.repository }}/issues/new/choose) following the template. Thank you! diff --git a/.github/workflows/mkdocs.yaml b/.github/workflows/mkdocs.yaml deleted file mode 100644 index da0f0513d002..000000000000 --- a/.github/workflows/mkdocs.yaml +++ /dev/null @@ -1,28 +0,0 @@ -name: Publish docs via GitHub Pages -on: - push: - branches: - - main - paths: - - '.github/workflows/mkdocs.yaml' - - 'contributing/**' - workflow_dispatch: - -permissions: - contents: write - deployments: write - pages: write - -jobs: - build: - name: Publish Contributor GitHub Pages - runs-on: ubuntu-latest - steps: - - name: Checkout - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 - - - name: Publish - uses: mhausenblas/mkdocs-deploy-gh-pages@d77dd03172e96abbcdb081d8c948224762033653 # 1.26 - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - CONFIG_FILE: mkdocs.yml diff --git a/.github/workflows/on-push-tag.yml b/.github/workflows/on-push-tag.yml new file mode 100644 index 000000000000..1e53eb47b2e2 --- /dev/null +++ b/.github/workflows/on-push-tag.yml @@ -0,0 +1,39 @@ +name: go:release + +on: + push: + tags: + - 'v*' + +jobs: + go-publish: + runs-on: ubuntu-latest + + steps: + - name: Checkout commit + uses: actions/checkout@v4 + - name: Set up Go + uses: actions/setup-go@v5 + with: + go-version: '1.23' + - name: Build terraform-provider-azurerm + env: + VERSION: ga + run: |- + export GOBIN=$(go env GOBIN) + export GOPATH=$(go env GOPATH) + + export PATH=$PATH:$GOBIN + + go mod download + CGO_ENABLED=0 GOOS=$(go env GOOS) GOARCH=$(go env GOARCH) go build \ + -a \ + -v \ + -ldflags "$LD_FLAGS" \ + -o ${GITHUB_WORKSPACE}/terraform-provider-azurerm \ + main.go + - name: Store generated binary + uses: actions/upload-artifact@v4 + with: + name: terraform-provider-azurerm.bin + path: terraform-provider-azurerm diff --git a/.github/workflows/provider-test.yaml b/.github/workflows/provider-test.yaml deleted file mode 100644 index f0c1a2949c98..000000000000 --- a/.github/workflows/provider-test.yaml +++ /dev/null @@ -1,88 +0,0 @@ ---- -name: Provider Tests -on: - pull_request: - types: ["opened", "synchronize"] - paths: - - '.github/workflows/provider-test.yaml' - - 'internal/**.go' - - 'vendor/github.com/hashicorp/go-azure-sdk/sdk/auth/**' - - 'vendor/github.com/hashicorp/go-azure-sdk/sdk/environments/**' - -permissions: - contents: read - id-token: write - pull-requests: read - -jobs: - secrets-check: - runs-on: ubuntu-latest - outputs: - available: "${{ steps.check-secrets.outputs.available }}" - steps: - # we check for the ACTIONS_ID_TOKEN_REQUEST_URL variable as a proxy for other secrets - # it will be unset when running for a PR from a fork, in which case we don't run these tests - - id: check-secrets - run: | - if [[ "${ACTIONS_ID_TOKEN_REQUEST_URL}" == "" ]]; then - echo "available=false" | tee ${GITHUB_OUTPUT} - else - echo "available=true" | tee ${GITHUB_OUTPUT} - fi - - provider-tests: - runs-on: custom-linux-large - needs: [secrets-check] - if: needs.secrets-check.outputs.available == 'true' - steps: - - name: Checkout - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 - - - name: Install Go - uses: actions/setup-go@3041bf56c941b39c61721a86cd11f3bb1338122a # v5.2.0 - with: - go-version-file: ./.go-version - - - name: Azure CLI login - run: az login --output none --username="${{ secrets.AZCLI_USERNAME }}" --password="${{ secrets.AZCLI_PASSWORD }}" - - - name: Set OIDC Token - run: | - echo "ARM_OIDC_TOKEN=$(curl -H "Accept: application/json; api-version=2.0" -H "Authorization: Bearer ${ACTIONS_ID_TOKEN_REQUEST_TOKEN}" -H "Content-Type: application/json" -G --data-urlencode "audience=api://AzureADTokenExchange" "${ACTIONS_ID_TOKEN_REQUEST_URL}" | jq -r '.value')" >>${GITHUB_ENV} - - - name: Set OIDC Token File Path - run: echo "${ARM_OIDC_TOKEN}" >"${RUNNER_TEMP}/oidc-token.jwt" && echo "ARM_OIDC_TOKEN_FILE_PATH=${RUNNER_TEMP}/oidc-token.jwt" >>${GITHUB_ENV} - - - name: Set Client ID Path - run: echo "${{ secrets.ARM_CLIENT_ID }}" >"${RUNNER_TEMP}/client-id" && echo "ARM_CLIENT_ID_PATH=${RUNNER_TEMP}/client-id" >>${GITHUB_ENV} - - - name: Set Client Secret Path - run: echo "${{ secrets.ARM_CLIENT_SECRET }}" >"${RUNNER_TEMP}/client-secret" && echo "ARM_CLIENT_SECRET_PATH=${RUNNER_TEMP}/client-secret" >>${GITHUB_ENV} - - - name: Run provider tests - run: make testacc TEST=./internal/provider TESTARGS="-run '^TestAcc'" - env: - ARM_CLIENT_ID: ${{ secrets.ARM_CLIENT_ID }} - ARM_CLIENT_CERTIFICATE: ${{ secrets.ARM_CLIENT_CERTIFICATE }} - ARM_CLIENT_CERTIFICATE_PASSWORD: ${{ secrets.ARM_CLIENT_CERTIFICATE_PASSWORD }} - ARM_CLIENT_SECRET: ${{ secrets.ARM_CLIENT_SECRET }} - ARM_TENANT_ID: ${{ secrets.ARM_TENANT_ID }} - ARM_SUBSCRIPTION_ID: ${{ secrets.ARM_SUBSCRIPTION_ID }} - - - name: Clean Up OIDC Token File Path - run: rm -f "${RUNNER_TEMP}/oidc-token.jwt" - if: always() - - - name: Clean Up Client ID Path - run: rm -f "${RUNNER_TEMP}/client-id" - if: always() - - - name: Clean Up Client Secret Path - run: rm -f "${RUNNER_TEMP}/client-secret" - if: always() - save-artifacts-on-fail: - if: ${{ needs.secrets-check.result }} == 'failure' || ${{ needs.provider-tests.result }} == 'failure' - uses: ./.github/workflows/save-artifacts.yaml - comment-on-fail: - if: ${{ needs.depscheck.result }} == 'failure' - uses: ./.github/workflows/comment-failure.yaml diff --git a/.github/workflows/pull-request-new-commit.yaml b/.github/workflows/pull-request-new-commit.yaml deleted file mode 100644 index 987ce77f06b1..000000000000 --- a/.github/workflows/pull-request-new-commit.yaml +++ /dev/null @@ -1,15 +0,0 @@ ---- -name: Pull Request New Commit - -permissions: - pull-requests: write - -on: - pull_request_target: - types: [synchronize] - -jobs: - remove-waiting-response: - uses: ./.github/workflows/remove-issue-label.yml - with: - label-name: "waiting-response" diff --git a/.github/workflows/pull-request-reviewed-workflow.yaml b/.github/workflows/pull-request-reviewed-workflow.yaml deleted file mode 100644 index 45f84ef064cd..000000000000 --- a/.github/workflows/pull-request-reviewed-workflow.yaml +++ /dev/null @@ -1,55 +0,0 @@ ---- -name: "Pull Request Reviewed Workflow" - -on: - workflow_run: - workflows: - - "Pull Request Reviewed" - types: - - completed - -permissions: - pull-requests: write - -jobs: - add-or-remove-waiting-response: - runs-on: ubuntu-latest - outputs: - ghrepo: ${{ steps.env_vars.outputs.ghrepo }} - ghowner: ${{ steps.env_vars.outputs.ghowner }} - prnumber: ${{ steps.env_vars.outputs.prnumber }} - action: ${{ steps.env_vars.outputs.action }} - artifact_outcome: ${{ steps.env_vars.outputs.artifact_outcome }} - steps: - - name: Get Artifact - id: get_artifact - continue-on-error: true - uses: dawidd6/action-download-artifact@09f2f74827fd3a8607589e5ad7f9398816f540fe # v3.1.4 - with: - github_token: ${{secrets.GITHUB_TOKEN}} - workflow: pull-request-reviewed.yaml - - - name: env_vars - id: env_vars - if: steps.get_artifact.outcome == 'success' - run: | - echo "ghrepo=$(cat artifact/ghrepo.txt)" >>${GITHUB_OUTPUT} - echo "ghowner=$(cat artifact/ghowner.txt)" >>${GITHUB_OUTPUT} - echo "prnumber=$(cat artifact/prnumber.txt)" >>${GITHUB_OUTPUT} - echo "action=$(cat artifact/action.txt)" >>${GITHUB_OUTPUT} - echo "artifact_outcome=success" >>${GITHUB_OUTPUT} - - add-waiting-reponse: - needs: add-or-remove-waiting-response - runs-on: ubuntu-latest - if: needs.add-or-remove-waiting-response.outputs.artifact_outcome == 'success' && needs.add-or-remove-waiting-response.outputs.action == 'add-waiting-response' - steps: - - run: | - curl -X POST -H "Accept: application/vnd.github+json" -H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" "https://api.github.com/repos${{ needs.add-or-remove-waiting-response.outputs.ghowner }}/${{ needs.add-or-remove-waiting-response.outputs.ghrepo }}/issues/${{ needs.add-or-remove-waiting-response.outputs.prnumber }}/labels" -d '{"labels":["waiting-response"]}' - - remove-waiting-reponse: - needs: add-or-remove-waiting-response - if: needs.add-or-remove-waiting-response.outputs.artifact_outcome == 'success' && needs.add-or-remove-waiting-response.outputs.action == 'remove-waiting-response' - uses: ./.github/workflows/remove-issue-label.yml - with: - label-name: "waiting-response" diff --git a/.github/workflows/pull-request-reviewed.yaml b/.github/workflows/pull-request-reviewed.yaml deleted file mode 100644 index 9283fa3e4afe..000000000000 --- a/.github/workflows/pull-request-reviewed.yaml +++ /dev/null @@ -1,39 +0,0 @@ ---- -name: "Pull Request Reviewed" - -on: - pull_request_review: - types: [submitted] - -permissions: - pull-requests: read - -jobs: - add-or-remove-waiting-response: - runs-on: ubuntu-latest - steps: - - name: "Set Artifacts" - shell: bash - run: | - mkdir -p wr_actions - echo ${{ github.owner }} > wr_actions/ghowner.txt - echo ${{ github.repository }} > wr_actions/ghrepo.txt - echo ${{ github.event.pull_request.number }} > wr_actions/prnumber.txt - echo ${{ github.event.review.user.login }} > wr_actions/reviewer.txt - echo ${{ github.event.review.state }} > wr_actions/reviewstate.txt - - name: "Set Artifacts for add-waiting-response" - if: github.event.review.state != 'approved' && github.actor != github.event.pull_request.user.login - shell: bash - run: | - mkdir -p wr_actions - echo "add-waiting-response" > wr_actions/action.txt - - name: "Set Artifacts for remove-waiting-response" - if: github.actor == github.event.pull_request.user.login - shell: bash - run: | - mkdir -p wr_actions - echo "remove-waiting-response" > wr_actions/action.txt - - uses: actions/upload-artifact@6f51ac03b9356f520e9adb1b1b7802705f340c2b # v4.5.0 - with: - name: artifact - path: wr_actions diff --git a/.github/workflows/pull-request-type.yaml b/.github/workflows/pull-request-type.yaml deleted file mode 100644 index 6442e8614628..000000000000 --- a/.github/workflows/pull-request-type.yaml +++ /dev/null @@ -1,20 +0,0 @@ ---- -name: Pull Request Type - -permissions: - pull-requests: write - -on: - pull_request_target: - types: [opened, edited] - -jobs: - pr_triage_label_type: - runs-on: ubuntu-latest - steps: - - uses: github/issue-labeler@c1b0f9f52a63158c4adc09425e858e87b32e9685 # v3.4 - continue-on-error: true - with: - repo-token: "${{ secrets.GITHUB_TOKEN }}" - configuration-path: .github/labeler-pull-request-triage-type.yml - enable-versioned-regex: 0 \ No newline at end of file diff --git a/.github/workflows/pull-request.yaml b/.github/workflows/pull-request.yaml deleted file mode 100644 index 2faa348b36b3..000000000000 --- a/.github/workflows/pull-request.yaml +++ /dev/null @@ -1,30 +0,0 @@ ---- -name: "Pull Request Triage" - -permissions: - pull-requests: write - issues: write - -on: [pull_request_target] - -jobs: - triage: - runs-on: ubuntu-latest - steps: - - uses: actions/labeler@8558fd74291d67161a8a78ce36a881fa63b766a9 # v5.0.0 - with: - configuration-path: .github/labeler-pull-request-triage.yml - repo-token: "${{ secrets.GITHUB_TOKEN }}" - - uses: CodelyTV/pr-size-labeler@1c3422395d899286d5ee2c809fd5aed264d5eb9b # v1.10.2 - with: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - xs_label: 'size/XS' - xs_max_size: '30' - s_label: 'size/S' - s_max_size: '60' - m_label: 'size/M' - m_max_size: '150' - l_label: 'size/L' - l_max_size: '300' - xl_label: 'size/XL' - message_if_xl: '' diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml deleted file mode 100644 index 533f32da3cfd..000000000000 --- a/.github/workflows/release.yaml +++ /dev/null @@ -1,56 +0,0 @@ ---- -name: Release - -on: - push: - tags: - - 'v[0-9]+.[0-9]+.[0-9]+*' - -permissions: - contents: write - -jobs: - go-version: - runs-on: custom-linux-xl - outputs: - version: ${{ steps.go-version.outputs.version }} - steps: - - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 - - id: go-version - run: echo "version=$(cat ./.go-version)" >>${GITHUB_OUTPUT} - - release-notes: - runs-on: custom-linux-xl - steps: - - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 - with: - fetch-depth: 0 - - name: Generate Release Notes - run: sed -n -e "1{/# /d;}" -e "2{/^$/d;}" -e "/# $(git describe --abbrev=0 --exclude="$(git describe --abbrev=0 --match='v*.*.*' --tags)" --match='v*.*.*' --tags | tr -d v)/q;p" CHANGELOG.md > release-notes.txt - - uses: actions/upload-artifact@6f51ac03b9356f520e9adb1b1b7802705f340c2b # v4.5.0 - with: - name: release-notes - path: release-notes.txt - retention-days: 1 - - terraform-provider-release: - name: 'Terraform Provider Release' - needs: [go-version, release-notes] - uses: hashicorp/ghaction-terraform-provider-release/.github/workflows/hashicorp.yml@393dac4dd208c749b1622323f9f0e8d26a6f26cc # v4.0.1 - secrets: - hc-releases-github-token: '${{ secrets.HASHI_RELEASES_GITHUB_TOKEN }}' - hc-releases-host-staging: '${{ secrets.HC_RELEASES_HOST_STAGING }}' - hc-releases-host-prod: '${{ secrets.HC_RELEASES_HOST_PROD }}' - hc-releases-key-prod: '${{ secrets.HC_RELEASES_KEY_PROD }}' - hc-releases-key-staging: '${{ secrets.HC_RELEASES_KEY_STAGING }}' - hc-releases-terraform-registry-sync-token: '${{ secrets.TF_PROVIDER_RELEASE_TERRAFORM_REGISTRY_SYNC_TOKEN }}' - setup-signore-github-token: '${{ secrets.HASHI_SIGNORE_GITHUB_TOKEN }}' - signore-client-id: '${{ secrets.SIGNORE_CLIENT_ID }}' - signore-client-secret: '${{ secrets.SIGNORE_CLIENT_SECRET }}' - with: - goreleaser-release-args: --timeout 2h --verbose --parallelism 4 - hc-releases-aws-role-duration-seconds: 7200 - release-notes: true - setup-go-version: '${{ needs.go-version.outputs.version }}' - # Product Version (e.g. v1.2.3 or github.ref_name) - product-version: '${{ github.ref_name }}' diff --git a/.github/workflows/remove-issue-label.yml b/.github/workflows/remove-issue-label.yml deleted file mode 100644 index 3a442e72d559..000000000000 --- a/.github/workflows/remove-issue-label.yml +++ /dev/null @@ -1,50 +0,0 @@ -name: Remove specified label from issue - -on: - # This file is reused, and called from other workflows - workflow_call: - inputs: - label-name: - required: true - type: string - - -jobs: - remove-label: - runs-on: ubuntu-latest - steps: - - uses: actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea # v7.0.1 - env: - REMOVE_LABEL: ${{ inputs.label-name }} - with: - script: | - const { REMOVE_LABEL } = process.env - console.log(`Attempting to remove label "${REMOVE_LABEL}"`) - - const { data } = await github.rest.issues.listLabelsOnIssue({ - issue_number: context.issue.number, - owner: context.repo.owner, - repo: context.repo.repo, - }) - - // Return early if there are no labels - if (data.length == 0){ - console.log(`Issue has no labels; not attempting to remove label "${REMOVE_LABEL}"`) - return - } - - // Check if REMOVE_LABEL is present - const filteredData = data.filter(label => label.name == REMOVE_LABEL) - - // Return early if filtering didn't identify the label as present - if (filteredData.length == 0){ - console.log(`Label "${REMOVE_LABEL}" not found on issue; not attempting to remove it.`) - return - } - console.log(`Label "${REMOVE_LABEL}" found! Now deleting it from the issue...`) - await github.rest.issues.removeLabel({ - issue_number: context.issue.number, - owner: context.repo.owner, - repo: context.repo.repo, - name: REMOVE_LABEL - }) diff --git a/.github/workflows/save-artifacts.yaml b/.github/workflows/save-artifacts.yaml deleted file mode 100644 index 10a2558e6bd2..000000000000 --- a/.github/workflows/save-artifacts.yaml +++ /dev/null @@ -1,21 +0,0 @@ -name: Save Artifacts - -on: - # This file is reused, and called from other workflows - workflow_call: - -jobs: - save-artifacts: - runs-on: ubuntu-latest - steps: - - shell: bash - run: | - mkdir -p wr_actions - echo ${{ github.repository_owner }} > wr_actions/ghowner.txt - echo ${{ github.event.repository.name }} > wr_actions/ghrepo.txt - echo ${{ github.event.pull_request.number }} > wr_actions/prnumber.txt - - uses: actions/upload-artifact@6f51ac03b9356f520e9adb1b1b7802705f340c2b # v4.5.0 - with: - name: artifact - path: wr_actions - retention-days: 1 diff --git a/.github/workflows/static-analysis.yaml b/.github/workflows/static-analysis.yaml deleted file mode 100644 index 805022e98ae3..000000000000 --- a/.github/workflows/static-analysis.yaml +++ /dev/null @@ -1,28 +0,0 @@ ---- -name: Static Analysis - -permissions: - contents: read - pull-requests: read - -on: - pull_request: - types: ['opened', 'synchronize'] - paths: - - '.github/workflows/static-analysis.yaml' - - 'vendor/**' - - 'internal/**.go' - -concurrency: - group: 'staticAnalysys-${{ github.head_ref }}' - cancel-in-progress: true - -jobs: - detect: - runs-on: custom-linux-small - steps: - - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 - - uses: actions/setup-go@3041bf56c941b39c61721a86cd11f3bb1338122a # v5.2.0 - with: - go-version-file: ./.go-version - - run: bash ./scripts/run-static-analysis.sh diff --git a/.github/workflows/teamcity-test.yaml b/.github/workflows/teamcity-test.yaml deleted file mode 100644 index d24799a1ecdf..000000000000 --- a/.github/workflows/teamcity-test.yaml +++ /dev/null @@ -1,36 +0,0 @@ ---- -name: TeamCity Config Test - -permissions: - contents: read - -on: - pull_request: - types: ['opened', 'synchronize'] - paths: - - '.github/workflows/teamcity-test.yaml' - - '!.teamcity/components/generated/**' - - '!.teamcity/target/**' - - '.teamcity/**' - -concurrency: - group: 'tctest-${{ github.head_ref }}' - cancel-in-progress: true - -jobs: - teamcity-test: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 - - uses: actions/setup-java@7a6d8a8234af8eb26422e24e3006232cccaa061b # v4.6.0 - with: - distribution: zulu - java-version: 17 - java-package: jdk - - uses: actions/cache@1bd1e32a3bdc45362d1e726936510720a7c30a57 # v4.2.0 - with: - path: ~/.m2/repository - key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }} - restore-keys: | - ${{ runner.os }}-maven- - - run: make teamcity-test diff --git a/.github/workflows/tflint.yaml b/.github/workflows/tflint.yaml deleted file mode 100644 index 2f8059a954dc..000000000000 --- a/.github/workflows/tflint.yaml +++ /dev/null @@ -1,35 +0,0 @@ ---- -name: Terraform Schema Linting - -permissions: - contents: read - -on: - pull_request: - types: ['opened', 'synchronize'] - paths: - - '.github/workflows/tflint.yaml' - - 'vendor/**' - - '**.go' - -concurrency: - group: 'tflint-${{ github.head_ref }}' - cancel-in-progress: true - -jobs: - tflint: - runs-on: custom-linux-medium - steps: - - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 - - uses: actions/setup-go@3041bf56c941b39c61721a86cd11f3bb1338122a # v5.2.0 - with: - go-version-file: ./.go-version - - run: bash scripts/gogetcookie.sh - - run: make tools - - run: make tflint - save-artifacts-on-fail: - if: ${{ needs.tflint.result }} == 'failure' - uses: ./.github/workflows/save-artifacts.yaml - comment-on-fail: - if: ${{ needs.depscheck.result }} == 'failure' - uses: ./.github/workflows/comment-failure.yaml diff --git a/.github/workflows/thirty-two-bit.yaml b/.github/workflows/thirty-two-bit.yaml deleted file mode 100644 index 9376cd2cb9c0..000000000000 --- a/.github/workflows/thirty-two-bit.yaml +++ /dev/null @@ -1,35 +0,0 @@ ---- -name: 32 Bit Build - -permissions: - contents: read - pull-requests: read - -on: - pull_request: - types: ['opened', 'synchronize'] - paths: - - '.github/workflows/thirty-two-bit.yaml' - - 'vendor/**' - - '**.go' - -concurrency: - group: 'thirtytwo-${{ github.head_ref }}' - cancel-in-progress: true - -jobs: - compatibility-32bit-test: - runs-on: custom-linux-small - steps: - - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 - - uses: actions/setup-go@3041bf56c941b39c61721a86cd11f3bb1338122a # v5.2.0 - with: - go-version-file: ./.go-version - - run: bash scripts/gogetcookie.sh - - run: GOARCH=386 GOOS=linux go build -o 32bitbuild . - save-artifacts-on-fail: - if: ${{ needs.compatibility-32bit-test.result }} == 'failure' - uses: ./.github/workflows/save-artifacts.yaml - comment-on-fail: - if: ${{ needs.depscheck.result }} == 'failure' - uses: ./.github/workflows/comment-failure.yaml diff --git a/.github/workflows/unit-test.yaml b/.github/workflows/unit-test.yaml deleted file mode 100644 index 00a8952df3f8..000000000000 --- a/.github/workflows/unit-test.yaml +++ /dev/null @@ -1,37 +0,0 @@ ---- -name: Unit Tests - -permissions: - contents: read - pull-requests: read - -on: - pull_request: - types: ['opened', 'synchronize'] - paths: - - '.github/workflows/unit-test.yaml' - - 'vendor/**' - - '**.go' - -concurrency: - group: 'unit-${{ github.head_ref }}' - cancel-in-progress: true - -jobs: - test: - runs-on: custom-linux-large - steps: - - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 - - uses: actions/setup-go@3041bf56c941b39c61721a86cd11f3bb1338122a # v5.2.0 - with: - go-version-file: ./.go-version - - run: bash scripts/gogetcookie.sh - - run: make test - env: - GITHUB_ACTIONS_STAGE: "UNIT_TESTS" - save-artifacts-on-fail: - if: ${{ needs.test.result }} == 'failure' - uses: ./.github/workflows/save-artifacts.yaml - comment-on-fail: - if: ${{ needs.depscheck.result }} == 'failure' - uses: ./.github/workflows/comment-failure.yaml diff --git a/.github/workflows/validate-examples.yaml b/.github/workflows/validate-examples.yaml deleted file mode 100644 index 1de1f124690a..000000000000 --- a/.github/workflows/validate-examples.yaml +++ /dev/null @@ -1,35 +0,0 @@ ---- -name: Validate Examples - -permissions: - contents: read - pull-requests: read - -on: - pull_request: - types: ['opened', 'synchronize'] - paths: - - '.github/workflows/validate-examples.yaml' - - 'examples/**' - -concurrency: - group: 'examples-${{ github.head_ref }}' - cancel-in-progress: true - -jobs: - website-lint: - runs-on: custom-linux-small - steps: - - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 - - uses: actions/setup-go@3041bf56c941b39c61721a86cd11f3bb1338122a # v5.2.0 - with: - go-version-file: ./.go-version - - run: bash scripts/gogetcookie.sh - - run: make tools - - run: make validate-examples - save-artifacts-on-fail: - if: ${{ needs.website-lint.result }} == 'failure' - uses: ./.github/workflows/save-artifacts.yaml - comment-on-fail: - if: ${{ needs.depscheck.result }} == 'failure' - uses: ./.github/workflows/comment-failure.yaml diff --git a/.github/workflows/website-lint.yaml b/.github/workflows/website-lint.yaml deleted file mode 100644 index d24f86d9b7a4..000000000000 --- a/.github/workflows/website-lint.yaml +++ /dev/null @@ -1,31 +0,0 @@ ---- -name: Website Linting - -permissions: - contents: read - pull-requests: read - -on: - pull_request: - types: ["opened", "synchronize"] - paths: - - ".github/workflows/website-lint.yaml" - - "website/**" - -jobs: - website-lint: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 - - uses: actions/setup-go@3041bf56c941b39c61721a86cd11f3bb1338122a # v5.2.0 - with: - go-version-file: ./.go-version - - run: bash scripts/gogetcookie.sh - - run: make tools - - run: make website-lint - save-artifacts-on-fail: - if: ${{ needs.website-lint.result }} == 'failure' - uses: ./.github/workflows/save-artifacts.yaml - comment-on-fail: - if: ${{ needs.depscheck.result }} == 'failure' - uses: ./.github/workflows/comment-failure.yaml