mirror of
https://github.com/outbackdingo/homelab-v.git
synced 2026-08-25 14:53:19 +00:00
fix(ci): use devcontainer image directly for tofu checks
Signed-off-by: Vegard Hagen <[email protected]>
This commit is contained in:
@@ -3,9 +3,9 @@ name: Build devcontainer
|
||||
on:
|
||||
push:
|
||||
branches: [ main ]
|
||||
paths: [ ".devcontainer/**" ]
|
||||
paths: [ '.devcontainer/**' ]
|
||||
schedule:
|
||||
- cron: "4 20 28 * *"
|
||||
- cron: '4 20 28 * *'
|
||||
|
||||
jobs:
|
||||
build:
|
||||
|
||||
@@ -2,7 +2,7 @@ name: OpenTofu validation
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [ '**' ]
|
||||
branches: [ '**', '!renovate/**' ]
|
||||
paths:
|
||||
- '**.tf'
|
||||
- '**.tofu'
|
||||
@@ -13,17 +13,14 @@ on:
|
||||
pull_request_target:
|
||||
branches: [ main ]
|
||||
|
||||
permissions:
|
||||
packages: write
|
||||
|
||||
jobs:
|
||||
validate-tofu:
|
||||
tofu-format:
|
||||
name: Validate
|
||||
runs-on: ubuntu-latest
|
||||
permissions:
|
||||
contents: read
|
||||
env:
|
||||
TOFU_DIR: tofu/kubernetes
|
||||
TOFU_DIR: tofu
|
||||
|
||||
steps:
|
||||
- name: Checkout
|
||||
@@ -36,23 +33,7 @@ jobs:
|
||||
username: ${{ github.repository_owner }}
|
||||
password: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
- name: Tofu init
|
||||
uses: devcontainers/ci@8bf61b26e9c3a98f69cb6ce2f88d24ff59b785c6 #v0.3.1900000417
|
||||
with:
|
||||
cacheFrom: ghcr.io/vehagn/homelab-devcontainer
|
||||
push: never
|
||||
runCmd: tofu -chdir=${{ env.TOFU_DIR }} init
|
||||
|
||||
- name: Tofu validate
|
||||
uses: devcontainers/ci@8bf61b26e9c3a98f69cb6ce2f88d24ff59b785c6 #v0.3.1900000417
|
||||
with:
|
||||
cacheFrom: ghcr.io/vehagn/homelab-devcontainer
|
||||
push: never
|
||||
runCmd: tofu -chdir=${{ env.TOFU_DIR }} validate
|
||||
|
||||
- name: Tofu format
|
||||
uses: devcontainers/ci@8bf61b26e9c3a98f69cb6ce2f88d24ff59b785c6 #v0.3.1900000417
|
||||
uses: docker://ghcr.io/vehagn/homelab-devcontainer
|
||||
with:
|
||||
cacheFrom: ghcr.io/vehagn/homelab-devcontainer
|
||||
push: never
|
||||
runCmd: tofu -chdir=${{ env.TOFU_DIR }} fmt -recursive -diff -check
|
||||
args: tofu -chdir=${{ env.TOFU_DIR }} fmt -recursive -diff -check
|
||||
|
||||
Reference in New Issue
Block a user