feat: ✨ iot_objects package now has update objects functionality #55
Workflow file for this run
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
| # | |
| # Github workflow for pre-commit | |
| # | |
| # Copyright (c) 2025 Oracle and/or its affiliates. | |
| # Licensed under the Universal Permissive License v 1.0 as shown at | |
| # https://oss.oracle.com/licenses/upl. | |
| # | |
| # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. | |
| # | |
| name: Pre-commit checks | |
| on: | |
| pull_request: | |
| push: | |
| branches: | |
| - main | |
| jobs: | |
| pre-commit: | |
| runs-on: ubuntu-24.04 | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| with: | |
| # Fetch all history to ensure pre-commit can find merge-base | |
| fetch-depth: 0 | |
| - name: Set up Python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: '3.12' | |
| - name: Set up Node | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: '22.0' | |
| - name: Add ~/.local/bin directory | |
| shell: bash | |
| run: | | |
| mkdir --parents "${HOME}/.local/bin" | |
| echo "${HOME}/.local/bin" >> "${GITHUB_PATH}" | |
| - name: Install ShellCheck | |
| shell: bash | |
| env: | |
| SHELLCHECK_VERSION: 'v0.11.0' | |
| run: | | |
| echo "Installing ShellCheck..." | |
| curl --silent --location \ | |
| "https://github.com/koalaman/shellcheck/releases/download/${SHELLCHECK_VERSION}/shellcheck-${SHELLCHECK_VERSION}.linux.x86_64.tar.xz" | | |
| tar --extract --xz --directory="${HOME}/.local/bin" \ | |
| --strip-components=1 "shellcheck-${SHELLCHECK_VERSION}/shellcheck" | |
| shellcheck --version | |
| - name: Set up Terraform | |
| env: | |
| TERRAFORM_VERSION: '1.13.3' | |
| ARCH: amd64 | |
| run: | | |
| echo "Installing Terraform..." | |
| OS=$(uname | tr '[:upper:]' '[:lower:]') | |
| curl --silent --location --remote-name \ | |
| https://releases.hashicorp.com/terraform/${TERRAFORM_VERSION}/terraform_${TERRAFORM_VERSION}_${OS}_${ARCH}.zip | |
| unzip terraform_${TERRAFORM_VERSION}_${OS}_${ARCH}.zip terraform | |
| mv terraform "${HOME}/.local/bin" | |
| terraform version | |
| - name: Install pre-commit-terraform dependencies | |
| env: | |
| TFLINT_VERSION: 'v0.59.1' | |
| TRIVY_VERSION: '0.67.0' | |
| shell: bash | |
| run: | | |
| echo "Installing tflint..." | |
| curl --silent --location \ | |
| https://github.com/terraform-linters/tflint/releases/download/${TFLINT_VERSION}/tflint_linux_amd64.zip > tflint.zip && | |
| unzip tflint.zip tflint -d "${HOME}/.local/bin" && rm tflint.zip | |
| tflint --version | |
| echo "Installing trivy..." | |
| curl --silent --location \ | |
| https://github.com/aquasecurity/trivy/releases/download/v${TRIVY_VERSION}/trivy_${TRIVY_VERSION}_Linux-64bit.tar.gz | | |
| tar -xz --directory="${HOME}/.local/bin" trivy | |
| trivy --version | |
| - name: Install pre-commit | |
| env: | |
| PRE_COMMIT_VERSION: '4.3.0' | |
| run: | | |
| pip install pre-commit==${PRE_COMMIT_VERSION} | |
| pre-commit --version | |
| - name: Run pre-commit hooks | |
| run: pre-commit run --all-files |