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
| name: Feature branch tofu checks (containerized) with tok | |
| on: | |
| push: | |
| branches: | |
| - "feature/**" | |
| pull_request: | |
| branches: | |
| - develop | |
| types: [opened, synchronize, reopened] | |
| permissions: | |
| contents: read | |
| packages: read | |
| jobs: | |
| tofu-checks: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| # Required if the GHCR image is private | |
| - name: Log in to GHCR | |
| env: | |
| GHCR_TOKEN: ${{ secrets.GHCR_TOKEN }} | |
| run: | | |
| docker login ghcr.io -u "noahwhite" --password-stdin <<< "$GHCR_TOKEN" | |
| - name: Pull OpenTofu tools image | |
| run: | | |
| docker pull ghcr.io/noahwhite/ghost-stack-shell:latest | |
| - name: Run tofu fmt check (recursive) | |
| run: | | |
| docker run --rm \ | |
| -v "${GITHUB_WORKSPACE}:/home/devops/app" \ | |
| -w /home/devops/app \ | |
| ghcr.io/noahwhite/ghost-stack-shell:latest \ | |
| tofu fmt -check -recursive |