Update haproxy Docker tag to v3.3.7 (#1066) #3263
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: Terraform CI Pipeline | |
| on: | |
| push: | |
| branches: | |
| - main | |
| pull_request: | |
| defaults: | |
| run: | |
| working-directory: terraform | |
| jobs: | |
| lint: | |
| name: Lint | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v6 | |
| - name: Get Terraform version | |
| id: terraform-version | |
| uses: bigwheel/get-terraform-version-action@v1.3.0 | |
| with: | |
| path: terraform | |
| - name: Setup Terraform | |
| uses: hashicorp/setup-terraform@v4 | |
| with: | |
| terraform_version: ${{ steps.terraform-version.outputs.terraform-version }} | |
| - name: Lint | |
| uses: reviewdog/action-tflint@v1.25.0 | |
| with: | |
| github_token: ${{ github.token }} | |
| working_directory: terraform | |
| fail_level: any | |
| filter_mode: nofilter | |
| format: | |
| name: Format | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Generate a token | |
| id: token | |
| uses: actions/create-github-app-token@v3 | |
| with: | |
| app-id: ${{ secrets.PUSHER_APP_ID }} | |
| private-key: ${{ secrets.PUSHER_PRIVATE_KEY }} | |
| - name: Checkout | |
| uses: actions/checkout@v6 | |
| with: | |
| token: ${{ steps.token.outputs.token }} | |
| - name: Set up Task | |
| uses: arduino/setup-task@v2 | |
| with: | |
| repo-token: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Get Terraform version | |
| id: terraform-version | |
| uses: bigwheel/get-terraform-version-action@v1.3.0 | |
| with: | |
| path: terraform | |
| - name: Setup Terraform | |
| uses: hashicorp/setup-terraform@v4 | |
| with: | |
| terraform_version: ${{ steps.terraform-version.outputs.terraform-version }} | |
| - name: Terraform Format | |
| id: fmt | |
| run: task format-terraform | |
| - name: Push | |
| id: push | |
| uses: stefanzweifel/git-auto-commit-action@v7 | |
| with: | |
| commit_message: "Run terraform format" | |
| branch: ${{ github.head_ref }} | |
| commit_user_name: ictsc-actions[bot] | |
| commit_user_email: 154957684+ictsc-actions[bot]@users.noreply.github.com | |
| commit_author: ictsc-actions[bot] <154957684+ictsc-actions[bot]@users.noreply.github.com> | |
| - name: Exit with Error If Files Are Changed | |
| if: steps.push.outputs.changes_detected == 'true' | |
| run: exit 1 | |
| plan: | |
| name: Plan | |
| runs-on: ubuntu-latest | |
| env: | |
| SAKURACLOUD_ACCESS_TOKEN: ${{ secrets.SAKURACLOUD_ACCESS_TOKEN }} | |
| SAKURACLOUD_ACCESS_TOKEN_SECRET: ${{ secrets.SAKURACLOUD_ACCESS_TOKEN_SECRET }} | |
| SAKURACLOUD_ZONE: tk1b | |
| AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} | |
| AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} | |
| TF_VAR_cluster_pass: ${{ secrets.TF_VAR_CLUSTER_PASS }} | |
| TF_STATE_BUCKET: ictsc-drove | |
| TF_WORKSPACE: dev | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v6 | |
| - name: Set up Task | |
| uses: arduino/setup-task@v2 | |
| with: | |
| repo-token: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Get Terraform version | |
| id: terraform-version | |
| uses: bigwheel/get-terraform-version-action@v1.3.0 | |
| with: | |
| path: terraform | |
| - name: Setup Terraform | |
| uses: hashicorp/setup-terraform@v4 | |
| with: | |
| terraform_version: ${{ steps.terraform-version.outputs.terraform-version }} | |
| - name: Terraform Init | |
| id: init | |
| run: task init-terraform | |
| - name: Generate Keys | |
| working-directory: dev | |
| run: | | |
| if [ ! -e keys ]; then | |
| chmod +x keys.sh; ./keys.sh | |
| fi | |
| - name: Terraform Plan | |
| id: plan | |
| run: terraform plan -no-color | |
| continue-on-error: true | |
| - uses: actions/github-script@v9.0.0 | |
| if: github.event_name == 'pull_request' | |
| env: | |
| PLAN: "terraform\n${{ steps.plan.outputs.stdout }}" | |
| with: | |
| github-token: ${{ secrets.GITHUB_TOKEN }} | |
| script: | | |
| const output = `#### Terraform Initialization \`${{ steps.init.outcome }}\` | |
| #### Terraform Plan \`${{ steps.plan.outcome }}\` | |
| #### Pusher: ${{ github.actor }}, Action: \`${{ github.event_name }}\` | |
| <details><summary>Show Plan</summary> | |
| \`\`\`text | |
| ${process.env.PLAN}\`\`\` | |
| </details>` | |
| github.rest.issues.createComment({ | |
| issue_number: context.issue.number, | |
| owner: context.repo.owner, | |
| repo: context.repo.repo, | |
| body: output | |
| }) | |
| - name: Terraform Plan Status | |
| if: steps.plan.outcome == 'failure' | |
| run: exit 1 |