diff --git a/.github/workflows/lint-dockerfile.yaml b/.github/workflows/lint-dockerfile.yaml new file mode 100644 index 0000000..b186ef0 --- /dev/null +++ b/.github/workflows/lint-dockerfile.yaml @@ -0,0 +1,34 @@ +name: Lint Dockerfile +on: + push: + branches: + - main + pull_request: + branches: + - main +jobs: + validate-dockerfile: + name: Validate Dockerfile + runs-on: ubuntu-latest + steps: + - name: Checkout repository code + uses: actions/checkout@v6 + - name: Install docker buildx + uses: docker/setup-buildx-action@v3 + - name: Check Dockerfile for errors + uses: docker/build-push-action@v6 + with: + file: .devcontainer/Dockerfile + call: check + lint-dockerfile: + name: Lint Dockerfile + runs-on: ubuntu-latest + needs: validate-dockerfile + steps: + - name: Checkout repository code + uses: actions/checkout@v6 + - name: Check Dockerfile for errors + uses: hadolint/hadolint-action@master + with: + dockerfile: .devcontainer/Dockerfile + config: .hadolint.yaml diff --git a/.github/workflows/ publish-devcontainer.yaml b/.github/workflows/publish-devcontainer.yaml similarity index 77% rename from .github/workflows/ publish-devcontainer.yaml rename to .github/workflows/publish-devcontainer.yaml index c7060f6..65d9a68 100644 --- a/.github/workflows/ publish-devcontainer.yaml +++ b/.github/workflows/publish-devcontainer.yaml @@ -18,9 +18,11 @@ jobs: password: ${{ secrets.DOCKERHUB_ACCESS_TOKEN }} - name: Install docker buildx uses: docker/setup-buildx-action@v3 + - name: Extract repository name + run: echo "REPO_NAME=$(basename ${{ github.repository }})" >> ${GITHUB_ENV} - name: Build and push uses: docker/build-push-action@v6 with: context: .devcontainer push: true - tags: dhglennvl/cpp-devcontainer:latest + tags: ${{ secrets.DOCKERHUB_USERNAME }}/${{ env.REPO_NAME }}:latest diff --git a/.github/workflows/sanity-checks.yaml b/.github/workflows/sanity-checks.yaml index 8054930..9880c20 100644 --- a/.github/workflows/sanity-checks.yaml +++ b/.github/workflows/sanity-checks.yaml @@ -53,9 +53,14 @@ jobs: cacheFrom: ${{ env.GHCR_URL }} push: never runCmd: | + ccache --version clang --version + clang-format --version + clang-tidy --version + clangd --version cmake --version cppcheck --version + lldb --version vcpkg --version build-test-project: name: Build test project diff --git a/.hadolint.yaml b/.hadolint.yaml new file mode 100644 index 0000000..8f7e23e --- /dev/null +++ b/.hadolint.yaml @@ -0,0 +1,2 @@ +ignored: + - DL3008