diff --git a/.github/workflows/base.yml b/.github/workflows/base.yml index 5238adcd..4633f0c2 100644 --- a/.github/workflows/base.yml +++ b/.github/workflows/base.yml @@ -7,6 +7,9 @@ on: paths: - '**/base/*.Dockerfile' - '**/base/*.hcl' + pull_request: + paths: + - '**/base/*.hcl' schedule: - cron: '0 0 * * 1' @@ -15,9 +18,16 @@ jobs: strategy: fail-fast: false matrix: - version: [ next, 2024.1, 2023.3, 2023.2 ] + version: [ "next", "2024.1", "2023.3", "2023.2" ] + group: [ "default", "more" ] runs-on: ubuntu-latest steps: + - name: Clean up + run: | + sudo rm -rf /usr/share/dotnet + sudo rm -rf /opt/ghc + sudo rm -rf "/usr/local/share/boost" + sudo rm -rf "$AGENT_TOOLSDIRECTORY" - name: Checkout uses: actions/checkout@v4 - name: Set up QEMU @@ -34,3 +44,7 @@ jobs: with: push: ${{ github.ref == 'refs/heads/main' }} workdir: ${{ matrix.version }}/base + targets: ${{ matrix.group }} + set: | + *.cache-from=type=gha,scope=provenance + *.cache-to=type=gha,scope=provenance,mode=max \ No newline at end of file diff --git a/2023.2/base/docker-bake.hcl b/2023.2/base/docker-bake.hcl index ac749c40..65f46a76 100644 --- a/2023.2/base/docker-bake.hcl +++ b/2023.2/base/docker-bake.hcl @@ -1,5 +1,13 @@ +group "all" { + targets = ["debian", "debian-js", "python", "python-js", "dotnet", "go", "js", "php", "rust", "ruby", "cpp", "cdnet"] +} + group "default" { - targets = ["debian", "debian-js", "python", "python-js", "dotnet", "go", "js", "php"] + targets = ["debian", "debian-js", "python", "python-js"] +} + +group "more" { + targets = ["dotnet", "go", "js", "php"] } variable "NODE_TAG" { @@ -20,12 +28,6 @@ target "debian" { } platforms = ["linux/amd64", "linux/arm64"] dockerfile = "debian.Dockerfile" - cache-from = [ - "type=local,src=docker_cache/debian", - ] - cache-to = [ - "type=local,dest=docker_cache/debian,mode=max", - ] } target "debian-js" { @@ -40,12 +42,6 @@ target "debian-js" { ] platforms = ["linux/amd64", "linux/arm64"] dockerfile = "debian.js.Dockerfile" - cache-from = [ - "type=local,src=docker_cache/debian_js", - ] - cache-to = [ - "type=local,dest=docker_cache/debian_js,mode=max", - ] } target "python" { @@ -57,12 +53,6 @@ target "python" { ] platforms = ["linux/amd64", "linux/arm64"] dockerfile = "python.Dockerfile" - cache-from = [ - "type=local,src=docker_cache/python", - ] - cache-to = [ - "type=local,dest=docker_cache/python,mode=max", - ] } target "python-js" { @@ -77,12 +67,6 @@ target "python-js" { ] platforms = ["linux/amd64", "linux/arm64"] dockerfile = "python.js.Dockerfile" - cache-from = [ - "type=local,src=docker_cache/python_js", - ] - cache-to = [ - "type=local,dest=docker_cache/python_js,mode=max", - ] } target "dotnet" { @@ -95,12 +79,6 @@ target "dotnet" { ] platforms = ["linux/amd64", "linux/arm64"] dockerfile = "dotnet.Dockerfile" - cache-from = [ - "type=local,src=docker_cache/dotnet", - ] - cache-to = [ - "type=local,dest=docker_cache/dotnet,mode=max", - ] } target "go" { @@ -113,12 +91,6 @@ target "go" { ] platforms = ["linux/amd64", "linux/arm64"] dockerfile = "go.Dockerfile" - cache-from = [ - "type=local,src=docker_cache/go", - ] - cache-to = [ - "type=local,dest=docker_cache/go,mode=max", - ] } target "js" { @@ -130,12 +102,6 @@ target "js" { ] platforms = ["linux/amd64", "linux/arm64"] dockerfile = "js.Dockerfile" - cache-from = [ - "type=local,src=docker_cache/js", - ] - cache-to = [ - "type=local,dest=docker_cache/js,mode=max", - ] } target "php" { @@ -149,12 +115,6 @@ target "php" { ] platforms = ["linux/amd64", "linux/arm64"] dockerfile = "php.Dockerfile" - cache-from = [ - "type=local,src=docker_cache/php", - ] - cache-to = [ - "type=local,dest=docker_cache/php,mode=max", - ] } target "rust" { @@ -167,12 +127,6 @@ target "rust" { ] platforms = ["linux/amd64", "linux/arm64"] dockerfile = "rust.Dockerfile" - cache-from = [ - "type=local,src=docker_cache/rust", - ] - cache-to = [ - "type=local,dest=docker_cache/rust,mode=max", - ] } target "ruby" { @@ -185,12 +139,6 @@ target "ruby" { ] platforms = ["linux/amd64", "linux/arm64"] dockerfile = "ruby.Dockerfile" - cache-from = [ - "type=local,src=docker_cache/ruby", - ] - cache-to = [ - "type=local,dest=docker_cache/ruby,mode=max", - ] } target "cpp" { @@ -202,12 +150,6 @@ target "cpp" { } platforms = ["linux/amd64", "linux/arm64"] dockerfile = "cpp.Dockerfile" - cache-from = [ - "type=local,src=docker_cache/cpp", - ] - cache-to = [ - "type=local,dest=docker_cache/cpp,mode=max", - ] } target "cdnet" { @@ -219,10 +161,4 @@ target "cdnet" { } platforms = ["linux/amd64", "linux/arm64"] dockerfile = "dotnet.community.Dockerfile" - cache-from = [ - "type=local,src=docker_cache/cdnet", - ] - cache-to = [ - "type=local,dest=docker_cache/cdnet,mode=max", - ] } diff --git a/2023.3/base/docker-bake.hcl b/2023.3/base/docker-bake.hcl index f4183cd0..c55ed2b3 100644 --- a/2023.3/base/docker-bake.hcl +++ b/2023.3/base/docker-bake.hcl @@ -1,19 +1,21 @@ -group "default" { +group "all" { targets = ["debian", "debian-js", "python", "python-js", "other"] } +group "default" { + targets = ["debian", "debian-js", "python", "python-js"] +} + +group "more" { + targets = ["other"] +} + target "debian" { tags = [ "registry.jetbrains.team/p/sa/containers/qodana:debian-base-233" ] platforms = ["linux/amd64", "linux/arm64"] dockerfile = "debian.Dockerfile" - cache-from = [ - "type=local,src=docker_cache/debian", - ] - cache-to = [ - "type=local,dest=docker_cache/debian,mode=max", - ] } target "debian-js" { @@ -25,12 +27,6 @@ target "debian-js" { ] platforms = ["linux/amd64", "linux/arm64"] dockerfile = "debian.js.Dockerfile" - cache-from = [ - "type=local,src=docker_cache/debian_js", - ] - cache-to = [ - "type=local,dest=docker_cache/debian_js,mode=max", - ] } target "python" { @@ -42,12 +38,6 @@ target "python" { ] platforms = ["linux/amd64", "linux/arm64"] dockerfile = "python.Dockerfile" - cache-from = [ - "type=local,src=docker_cache/python", - ] - cache-to = [ - "type=local,dest=docker_cache/python,mode=max", - ] } target "python-js" { @@ -59,12 +49,6 @@ target "python-js" { ] platforms = ["linux/amd64", "linux/arm64"] dockerfile = "python.js.Dockerfile" - cache-from = [ - "type=local,src=docker_cache/python_js", - ] - cache-to = [ - "type=local,dest=docker_cache/python_js,mode=max", - ] } target "other" { @@ -77,10 +61,4 @@ target "other" { ] platforms = ["linux/amd64", "linux/arm64"] dockerfile = "${edition}.Dockerfile" - cache-from = [ - "type=local,src=docker_cache/other", - ] - cache-to = [ - "type=local,dest=docker_cache/other,mode=max", - ] } \ No newline at end of file diff --git a/2024.1/base/docker-bake.hcl b/2024.1/base/docker-bake.hcl index 3ce55537..26d9a9aa 100644 --- a/2024.1/base/docker-bake.hcl +++ b/2024.1/base/docker-bake.hcl @@ -1,19 +1,21 @@ -group "default" { +group "all" { targets = ["debian", "debian-js", "python", "python-js", "other"] } +group "default" { + targets = ["debian", "debian-js", "python", "python-js"] +} + +group "more" { + targets = ["other"] +} + target "debian" { tags = [ "registry.jetbrains.team/p/sa/containers/qodana:debian-base-241" ] platforms = ["linux/amd64", "linux/arm64"] dockerfile = "debian.Dockerfile" - cache-from = [ - "type=local,src=docker_cache/debian", - ] - cache-to = [ - "type=local,dest=docker_cache/debian,mode=max", - ] } target "debian-js" { @@ -25,12 +27,6 @@ target "debian-js" { ] platforms = ["linux/amd64", "linux/arm64"] dockerfile = "debian.js.Dockerfile" - cache-from = [ - "type=local,src=docker_cache/debian_js", - ] - cache-to = [ - "type=local,dest=docker_cache/debian_js,mode=max", - ] } target "python" { @@ -42,12 +38,6 @@ target "python" { ] platforms = ["linux/amd64", "linux/arm64"] dockerfile = "python.Dockerfile" - cache-from = [ - "type=local,src=docker_cache/python", - ] - cache-to = [ - "type=local,dest=docker_cache/python,mode=max", - ] } target "python-js" { @@ -59,12 +49,6 @@ target "python-js" { ] platforms = ["linux/amd64", "linux/arm64"] dockerfile = "python.js.Dockerfile" - cache-from = [ - "type=local,src=docker_cache/python_js", - ] - cache-to = [ - "type=local,dest=docker_cache/python_js,mode=max", - ] } target "other" { @@ -77,10 +61,4 @@ target "other" { ] platforms = ["linux/amd64", "linux/arm64"] dockerfile = "${edition}.Dockerfile" - cache-from = [ - "type=local,src=docker_cache/other", - ] - cache-to = [ - "type=local,dest=docker_cache/other,mode=max", - ] } \ No newline at end of file diff --git a/next/base/docker-bake.hcl b/next/base/docker-bake.hcl index cc758f70..be3f8a6f 100644 --- a/next/base/docker-bake.hcl +++ b/next/base/docker-bake.hcl @@ -1,19 +1,21 @@ -group "default" { +group "all" { targets = ["debian", "debian-js", "python", "python-js", "other"] } +group "default" { + targets = ["debian", "debian-js", "python", "python-js"] +} + +group "more" { + targets = ["other"] +} + target "debian" { tags = [ "registry.jetbrains.team/p/sa/containers/qodana:debian-base-latest" ] platforms = ["linux/amd64", "linux/arm64"] dockerfile = "debian.Dockerfile" - cache-from = [ - "type=local,src=docker_cache/debian", - ] - cache-to = [ - "type=local,dest=docker_cache/debian,mode=max", - ] } target "debian-js" { @@ -25,12 +27,6 @@ target "debian-js" { ] platforms = ["linux/amd64", "linux/arm64"] dockerfile = "debian.js.Dockerfile" - cache-from = [ - "type=local,src=docker_cache/debian_js", - ] - cache-to = [ - "type=local,dest=docker_cache/debian_js,mode=max", - ] } target "python" { @@ -42,12 +38,6 @@ target "python" { ] platforms = ["linux/amd64", "linux/arm64"] dockerfile = "python.Dockerfile" - cache-from = [ - "type=local,src=docker_cache/python", - ] - cache-to = [ - "type=local,dest=docker_cache/python,mode=max", - ] } target "python-js" { @@ -59,12 +49,6 @@ target "python-js" { ] platforms = ["linux/amd64", "linux/arm64"] dockerfile = "python.js.Dockerfile" - cache-from = [ - "type=local,src=docker_cache/python_js", - ] - cache-to = [ - "type=local,dest=docker_cache/python_js,mode=max", - ] } target "other" { @@ -77,10 +61,4 @@ target "other" { ] platforms = ["linux/amd64", "linux/arm64"] dockerfile = "${edition}.Dockerfile" - cache-from = [ - "type=local,src=docker_cache/other", - ] - cache-to = [ - "type=local,dest=docker_cache/other,mode=max", - ] } \ No newline at end of file