fix(ci): use devcontainer image directly for tofu checks

Signed-off-by: Vegard Hagen <[email protected]>
This commit is contained in:
Vegard Hagen
2025-07-14 18:52:39 +02:00
parent 66dad81d84
commit cdea7e1719
3 changed files with 7 additions and 27 deletions
-1
View File
@@ -13,7 +13,6 @@
"username": "homelab"
},
"ghcr.io/devcontainers/features/github-cli:1": {},
"ghcr.io/devcontainers/features/go:1": {},
"ghcr.io/devcontainers/features/java:1": {},
"ghcr.io/devcontainers-extra/features/argo-cd:1": {},
"ghcr.io/devcontainers-extra/features/talosctl:1": {},
+2 -2
View File
@@ -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:
+5 -24
View File
@@ -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