Repository navigation
Update Dockerfile and add Docker/hadolint CI workflows #75
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,16 @@ | ||
| { | ||
| "problemMatcher": [ | ||
| { | ||
| "owner": "hadolint", | ||
| "pattern": [ | ||
| { | ||
| "regexp": "^(.+):(\\d+) (\\S+) ((?:error|warning|info|style): .+)$", | ||
| "file": 1, | ||
| "line": 2, | ||
| "code": 3, | ||
| "message": 4 | ||
| } | ||
| ] | ||
| } | ||
| ] | ||
| } |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,31 @@ | ||
| hadolint-matcher.json | ||
| AVO2 Library | ||
|
|
||
| SPDX-FileCopyrightText: 2010 University of North Carolina at Chapel Hill | ||
| SPDX-License-Identifier: Apache-2.0 | ||
|
|
||
| Licensed under the Apache License, Version 2.0 (the "License"); | ||
| you may not use this file except in compliance with the License. | ||
| You may obtain a copy of the License at | ||
|
|
||
| https://www.apache.org/licenses/LICENSE-2.0 | ||
|
|
||
| Unless required by applicable law or agreed to in writing, software | ||
| distributed under the License is distributed on an "AS IS" BASIS, | ||
| WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
| See the License for the specific language governing permissions and | ||
| limitations under the License. | ||
|
|
||
| Please send all bug reports to <geom@cs.unc.edu>. | ||
|
|
||
| The authors may be contacted via: | ||
|
|
||
| Jur van den Berg, Jamie Snape, Stephen J. Guy, and Dinesh Manocha | ||
| Dept. of Computer Science | ||
| 201 S. Columbia St. | ||
| Frederick P. Brooks, Jr. Computer Science Bldg. | ||
| Chapel Hill, N.C. 27599-3175 | ||
| United States of America | ||
|
|
||
| <https://gamma.cs.unc.edu/AVO/> | ||
|
|
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -39,9 +39,29 @@ on: # yamllint disable-line rule:truthy | |
| push: | ||
| branches: | ||
| - main | ||
| paths: | ||
| - '**/*.bzl' | ||
| - '**/BUILD' | ||
| - '**/BUILD.bazel' | ||
| - '**/MODULE.bazel' | ||
| - '**/WORKSPACE' | ||
| - '**/WORKSPACE.bazel' | ||
| - '**/WORKSPACE.bzlmod' | ||
| - .buildifier.json | ||
| - .github/workflows/buildifier.yml | ||
| pull_request: | ||
| branches: | ||
| - main | ||
| paths: | ||
| - '**/*.bzl' | ||
|
Comment on lines
+55
to
+56
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Include the other file types scanned by buildifier. A PR that changes only
|
||
| - '**/BUILD' | ||
| - '**/BUILD.bazel' | ||
| - '**/MODULE.bazel' | ||
| - '**/WORKSPACE' | ||
| - '**/WORKSPACE.bazel' | ||
| - '**/WORKSPACE.bzlmod' | ||
| - .buildifier.json | ||
| - .github/workflows/buildifier.yml | ||
| schedule: | ||
| - cron: '50 7 * * *' | ||
|
|
||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,89 @@ | ||
| # | ||
| # docker.yml | ||
| # AVO2 Library | ||
| # | ||
| # SPDX-FileCopyrightText: 2010 University of North Carolina at Chapel Hill | ||
| # SPDX-License-Identifier: Apache-2.0 | ||
| # | ||
| # Licensed under the Apache License, Version 2.0 (the "License"); | ||
| # you may not use this file except in compliance with the License. | ||
| # You may obtain a copy of the License at | ||
| # | ||
| # https://www.apache.org/licenses/LICENSE-2.0 | ||
| # | ||
| # Unless required by applicable law or agreed to in writing, software | ||
| # distributed under the License is distributed on an "AS IS" BASIS, | ||
| # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
| # See the License for the specific language governing permissions and | ||
| # limitations under the License. | ||
| # | ||
| # Please send all bug reports to <geom@cs.unc.edu>. | ||
| # | ||
| # The authors may be contacted via: | ||
| # | ||
| # Jur van den Berg, Jamie Snape, Stephen J. Guy, and Dinesh Manocha | ||
| # Dept. of Computer Science | ||
| # 201 S. Columbia St. | ||
| # Frederick P. Brooks, Jr. Computer Science Bldg. | ||
| # Chapel Hill, N.C. 27599-3175 | ||
| # United States of America | ||
| # | ||
| # <https://gamma.cs.unc.edu/AVO/> | ||
| # | ||
|
|
||
| # yaml-language-server: $schema=https://json.schemastore.org/github-workflow.json | ||
| --- | ||
| name: docker | ||
|
|
||
| on: # yamllint disable-line rule:truthy | ||
| push: | ||
| branches: | ||
| - main | ||
| paths: | ||
| - Dockerfile | ||
| - .dockerignore | ||
| - .github/workflows/docker.yml | ||
| pull_request: | ||
| branches: | ||
| - main | ||
| paths: | ||
| - Dockerfile | ||
| - .dockerignore | ||
| - .github/workflows/docker.yml | ||
| schedule: | ||
| - cron: '20 8 * * 3' | ||
|
|
||
| permissions: | ||
| contents: read | ||
|
|
||
| concurrency: | ||
| group: ${{ github.workflow }}-${{ github.ref }} | ||
| cancel-in-progress: ${{ github.event_name == 'pull_request' }} | ||
|
|
||
| jobs: | ||
| docker: | ||
| name: docker ${{ matrix.name }} | ||
| runs-on: ${{ matrix.runner }} | ||
| timeout-minutes: 60 | ||
| strategy: | ||
| fail-fast: false | ||
| matrix: | ||
| include: | ||
| - name: amd64 | ||
| runner: ubuntu-latest | ||
| - name: arm64 | ||
| runner: ubuntu-26.04-arm | ||
| steps: | ||
| - name: checkout | ||
| uses: actions/checkout@v7.0.1 | ||
| with: | ||
| persist-credentials: false | ||
| - name: setup buildx | ||
| uses: docker/setup-buildx-action@v4.4.1 | ||
| - name: build | ||
| uses: docker/build-push-action@v7.4.0 | ||
| with: | ||
| context: . | ||
| push: false | ||
| cache-from: type=gha,scope=${{ matrix.name }} | ||
| cache-to: type=gha,mode=max,scope=${{ matrix.name }} |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,104 @@ | ||
| # | ||
| # hadolint.yml | ||
| # AVO2 Library | ||
| # | ||
| # SPDX-FileCopyrightText: 2010 University of North Carolina at Chapel Hill | ||
| # SPDX-License-Identifier: Apache-2.0 | ||
| # | ||
| # Licensed under the Apache License, Version 2.0 (the "License"); | ||
| # you may not use this file except in compliance with the License. | ||
| # You may obtain a copy of the License at | ||
| # | ||
| # https://www.apache.org/licenses/LICENSE-2.0 | ||
| # | ||
| # Unless required by applicable law or agreed to in writing, software | ||
| # distributed under the License is distributed on an "AS IS" BASIS, | ||
| # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
| # See the License for the specific language governing permissions and | ||
| # limitations under the License. | ||
| # | ||
| # Please send all bug reports to <geom@cs.unc.edu>. | ||
| # | ||
| # The authors may be contacted via: | ||
| # | ||
| # Jur van den Berg, Jamie Snape, Stephen J. Guy, and Dinesh Manocha | ||
| # Dept. of Computer Science | ||
| # 201 S. Columbia St. | ||
| # Frederick P. Brooks, Jr. Computer Science Bldg. | ||
| # Chapel Hill, N.C. 27599-3175 | ||
| # United States of America | ||
| # | ||
| # <https://gamma.cs.unc.edu/AVO/> | ||
| # | ||
|
|
||
| # yaml-language-server: $schema=https://json.schemastore.org/github-workflow.json | ||
| --- | ||
| name: hadolint | ||
|
|
||
| on: # yamllint disable-line rule:truthy | ||
| push: | ||
| branches: | ||
| - main | ||
| paths: | ||
| - .github/hadolint-matcher.json | ||
| - .github/workflows/hadolint.yml | ||
| - .hadolint.yaml | ||
| - .hadolint.yml | ||
| - Dockerfile | ||
| pull_request: | ||
| branches: | ||
| - main | ||
| paths: | ||
| - .github/hadolint-matcher.json | ||
| - .github/workflows/hadolint.yml | ||
| - .hadolint.yaml | ||
| - .hadolint.yml | ||
| - Dockerfile | ||
| schedule: | ||
| - cron: '50 7 * * *' | ||
|
|
||
| permissions: | ||
| contents: read | ||
|
|
||
| concurrency: | ||
| group: ${{ github.workflow }}-${{ github.ref }} | ||
| cancel-in-progress: ${{ github.event_name == 'pull_request' }} | ||
|
|
||
| jobs: | ||
| hadolint: | ||
| name: hadolint | ||
| runs-on: ubuntu-latest | ||
| container: debian:trixie-slim | ||
| timeout-minutes: 20 | ||
| steps: | ||
| - name: setup | ||
| run: | | ||
| apt-get -qq -o APT::Acquire::Retries=4 update \ | ||
| || (sleep 15; apt-get -qq -o APT::Acquire::Retries=4 update) | ||
| apt-get -qq -o APT::Acquire::Retries=4 -o Dpkg::Use-Pty=0 \ | ||
| upgrade | ||
| apt-get -qq -o APT::Acquire::Retries=4 -o Dpkg::Use-Pty=0 \ | ||
| --no-install-recommends install \ | ||
| ca-certificates \ | ||
| git \ | ||
| wget | ||
| apt-get -qq -o Dpkg::Use-Pty=0 autoremove | ||
| rm -rf /var/lib/apt/lists/* | ||
| wget --tries=4 --waitretry=15 --retry-on-http-error=429,500,502,503,504 \ | ||
| -qO /usr/local/bin/hadolint \ | ||
| https://github.com/hadolint/hadolint/releases/latest/download/hadolint-linux-x86_64 | ||
| chmod +x /usr/local/bin/hadolint | ||
| env: | ||
| DEBIAN_FRONTEND: noninteractive | ||
| shell: bash | ||
| - name: checkout | ||
| uses: actions/checkout@v7.0.1 | ||
| with: | ||
| persist-credentials: false | ||
| - name: add problem matcher | ||
| run: | | ||
| echo "::add-matcher::${GITHUB_WORKSPACE}/.github/hadolint-matcher.json" | ||
| shell: bash | ||
| - name: hadolint | ||
| run: hadolint Dockerfile | ||
| shell: bash |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Include standard
BUILDfilenames in both filters.If a pull request adds only
new-package/BUILD, neither filter matches. However,buildifier -r .discoversBUILDfiles. The change therefore removes pre-merge validation for that supported filename. (raw.githubusercontent.com)Add
'**/BUILD'to both lists. Also cover the supportedWORKSPACEandWORKSPACE.bazelfilenames. Keep the existing patterns. (raw.githubusercontent.com)Also applies to: 53-53