From 21e3b6e233fbadcf99b2184fadc08e409a5c1d72 Mon Sep 17 00:00:00 2001 From: Christian Sutter Date: Mon, 22 Dec 2025 13:25:47 +0000 Subject: [PATCH] Tweak GitHub Actions workflows - Add validation job - More consistent spacing and ordering - Remove unnecessary release permissions --- .github/workflows/release.yaml | 8 ++++---- .github/workflows/test.yaml | 16 +++++++++++++++- 2 files changed, 19 insertions(+), 5 deletions(-) diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index fb4a596..a86e87e 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -10,17 +10,17 @@ jobs: name: "Release to GHCR" if: ${{ github.ref == 'refs/heads/main' }} runs-on: ubuntu-latest + permissions: - contents: write - pull-requests: write packages: write + steps: - uses: actions/checkout@v6 - name: "Publish features" uses: devcontainers/action@v1 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} with: publish-features: "true" base-path-to-features: "./src" - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index 8a74390..dfdc763 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -5,12 +5,12 @@ on: branches: - main pull_request: - workflow_dispatch: jobs: docs: name: "Ensure documentation has been generated" runs-on: ubuntu-latest + steps: - uses: actions/checkout@v6 @@ -26,12 +26,26 @@ jobs: shellcheck: name: Shellcheck runs-on: ubuntu-latest + steps: - uses: actions/checkout@v6 - name: Run ShellCheck uses: ludeeus/action-shellcheck@2.0.0 + validate: + runs-on: ubuntu-latest + + steps: + - name: Checkout + uses: actions/checkout@v6 + + - name: Validate devcontainer-feature.json files + uses: devcontainers/action@v1 + with: + validate-only: "true" + base-path-to-features: ./src + test: name: "Test ${{ matrix.feature }} on ${{ matrix.baseImage }}" runs-on: ubuntu-latest