From 17a17e78d894769755750cba791161dec0712112 Mon Sep 17 00:00:00 2001 From: Cappy Ishihara Date: Thu, 18 Jul 2024 10:48:01 +0700 Subject: [PATCH 1/9] feat: Layered devtools image --- .github/workflows/build-docker.yml | 28 ++++++++++++++++++++++++++++ dockerfiles/devtools.dockerfile | 5 +++++ 2 files changed, 33 insertions(+) create mode 100644 dockerfiles/devtools.dockerfile diff --git a/.github/workflows/build-docker.yml b/.github/workflows/build-docker.yml index 5f9815a..de7eaeb 100644 --- a/.github/workflows/build-docker.yml +++ b/.github/workflows/build-docker.yml @@ -148,5 +148,33 @@ jobs: # also tag as latest buildah tag $MANIFEST $MANIFEST:latest || : buildah manifest push --all --format v2s2 $MANIFEST docker://$MANIFEST:$RELEASE + + docker-layer: + runs-on: ubuntu-latest + strategy: + fail-fast: true + matrix: + dockerfile: + - dockerfiles/devtools.dockerfile + + steps: + - name: Checkout + uses: actions/checkout@v2 + - name: Set up QEMU + uses: docker/setup-qemu-action@v3 + + - name: Build images + uses: docker/build-push-action@v6 + with: + context: . + file: ${{ matrix.dockerfile }} + platforms: linux/amd64,linux/arm64 + push: false + tags: | + ghcr.io/ultramarine-linux/ultramarine-devtools:40 + ghcr.io/ultramarine-linux/ultramarine-devtools:latest + args: | + RELEASE=40 + #### LIVE ISO #### diff --git a/dockerfiles/devtools.dockerfile b/dockerfiles/devtools.dockerfile new file mode 100644 index 0000000..5ccae70 --- /dev/null +++ b/dockerfiles/devtools.dockerfile @@ -0,0 +1,5 @@ +ARG RELEASE + +FROM ghcr.io/ultramarine-linux/ultramarine:${RELEASE} + +RUN dnf install -y @development-tools From d7e886096c01260fcf8f8e39e063ae8b43d26e7e Mon Sep 17 00:00:00 2001 From: Cappy Ishihara Date: Thu, 18 Jul 2024 10:52:13 +0700 Subject: [PATCH 2/9] fix: require push task first --- .github/workflows/build-docker.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/build-docker.yml b/.github/workflows/build-docker.yml index de7eaeb..d5d78a2 100644 --- a/.github/workflows/build-docker.yml +++ b/.github/workflows/build-docker.yml @@ -151,6 +151,7 @@ jobs: docker-layer: runs-on: ubuntu-latest + needs: docker-push strategy: fail-fast: true matrix: From f9871d5fca61df04b38d665fa1cc8fd8cf36a819 Mon Sep 17 00:00:00 2001 From: Cappy Ishihara Date: Thu, 18 Jul 2024 10:53:58 +0700 Subject: [PATCH 3/9] fix: use build-args --- .github/workflows/build-docker.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build-docker.yml b/.github/workflows/build-docker.yml index d5d78a2..d34b378 100644 --- a/.github/workflows/build-docker.yml +++ b/.github/workflows/build-docker.yml @@ -174,7 +174,7 @@ jobs: tags: | ghcr.io/ultramarine-linux/ultramarine-devtools:40 ghcr.io/ultramarine-linux/ultramarine-devtools:latest - args: | + build-args: | RELEASE=40 From 2ecb32f4409db1b7c36a2b39fe96e9ab59037de6 Mon Sep 17 00:00:00 2001 From: Cappy Ishihara Date: Thu, 18 Jul 2024 10:58:33 +0700 Subject: [PATCH 4/9] chore: start debugging workflow --- .github/workflows/build-docker.yml | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/.github/workflows/build-docker.yml b/.github/workflows/build-docker.yml index d34b378..53e559e 100644 --- a/.github/workflows/build-docker.yml +++ b/.github/workflows/build-docker.yml @@ -57,8 +57,6 @@ jobs: variant: - base/base-docker-x86_64 - base/base-docker-aarch64 - - base/devtools-docker-aarch64 - - base/devtools-docker-x86_64 outputs: artifact: ${{ matrix.variant }} @@ -115,8 +113,6 @@ jobs: #### DOCKER PUSH ###### docker-push: - strategy: - fail-fast: false runs-on: ubuntu-latest needs: docker if: github.event_name != 'pull_request' @@ -151,7 +147,7 @@ jobs: docker-layer: runs-on: ubuntu-latest - needs: docker-push + # needs: docker-push strategy: fail-fast: true matrix: @@ -165,7 +161,7 @@ jobs: uses: docker/setup-qemu-action@v3 - name: Build images - uses: docker/build-push-action@v6 + uses: dockerfiles/build-push-action@v6 with: context: . file: ${{ matrix.dockerfile }} From cd8b34d382959a03d8366d9d32b34bc77c1635b4 Mon Sep 17 00:00:00 2001 From: Cappy Ishihara Date: Thu, 18 Jul 2024 10:59:44 +0700 Subject: [PATCH 5/9] fix: workflow name --- .github/workflows/build-docker.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build-docker.yml b/.github/workflows/build-docker.yml index 53e559e..ce2e36f 100644 --- a/.github/workflows/build-docker.yml +++ b/.github/workflows/build-docker.yml @@ -161,7 +161,7 @@ jobs: uses: docker/setup-qemu-action@v3 - name: Build images - uses: dockerfiles/build-push-action@v6 + uses: docker/build-push-action@v6 with: context: . file: ${{ matrix.dockerfile }} From 17a44ce89259429d2eae2e96cc9c5e4b6ec66bbe Mon Sep 17 00:00:00 2001 From: Cappy Ishihara Date: Thu, 18 Jul 2024 11:03:03 +0700 Subject: [PATCH 6/9] fix: set up buildx first --- .github/workflows/build-docker.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/build-docker.yml b/.github/workflows/build-docker.yml index ce2e36f..f06a18b 100644 --- a/.github/workflows/build-docker.yml +++ b/.github/workflows/build-docker.yml @@ -159,6 +159,8 @@ jobs: uses: actions/checkout@v2 - name: Set up QEMU uses: docker/setup-qemu-action@v3 + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v3 - name: Build images uses: docker/build-push-action@v6 From 2e5b3616fd178d4e3ef5341a891574e93b973887 Mon Sep 17 00:00:00 2001 From: Cappy Ishihara Date: Thu, 18 Jul 2024 11:06:25 +0700 Subject: [PATCH 7/9] feat: run layer job after new image is pushed --- .github/workflows/build-docker.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build-docker.yml b/.github/workflows/build-docker.yml index f06a18b..65e72c3 100644 --- a/.github/workflows/build-docker.yml +++ b/.github/workflows/build-docker.yml @@ -147,7 +147,7 @@ jobs: docker-layer: runs-on: ubuntu-latest - # needs: docker-push + needs: docker-push strategy: fail-fast: true matrix: From da6b99119479bbaac621c0c3c97847fedf567283 Mon Sep 17 00:00:00 2001 From: Cappy Ishihara Date: Thu, 18 Jul 2024 11:28:41 +0700 Subject: [PATCH 8/9] chore: clean up dnf cache, push images --- .github/workflows/build-docker.yml | 2 +- dockerfiles/devtools.dockerfile | 2 +- .../modules/base/devtools-docker-aarch64.yaml | 37 ------------------- .../modules/base/devtools-docker-x86_64.yaml | 37 ------------------- 4 files changed, 2 insertions(+), 76 deletions(-) delete mode 100644 katsu/modules/base/devtools-docker-aarch64.yaml delete mode 100644 katsu/modules/base/devtools-docker-x86_64.yaml diff --git a/.github/workflows/build-docker.yml b/.github/workflows/build-docker.yml index 65e72c3..a98b4a1 100644 --- a/.github/workflows/build-docker.yml +++ b/.github/workflows/build-docker.yml @@ -168,7 +168,7 @@ jobs: context: . file: ${{ matrix.dockerfile }} platforms: linux/amd64,linux/arm64 - push: false + push: true tags: | ghcr.io/ultramarine-linux/ultramarine-devtools:40 ghcr.io/ultramarine-linux/ultramarine-devtools:latest diff --git a/dockerfiles/devtools.dockerfile b/dockerfiles/devtools.dockerfile index 5ccae70..f3c03d0 100644 --- a/dockerfiles/devtools.dockerfile +++ b/dockerfiles/devtools.dockerfile @@ -2,4 +2,4 @@ ARG RELEASE FROM ghcr.io/ultramarine-linux/ultramarine:${RELEASE} -RUN dnf install -y @development-tools +RUN dnf install -y @development-tools && dnf clean all diff --git a/katsu/modules/base/devtools-docker-aarch64.yaml b/katsu/modules/base/devtools-docker-aarch64.yaml deleted file mode 100644 index 85a0bd9..0000000 --- a/katsu/modules/base/devtools-docker-aarch64.yaml +++ /dev/null @@ -1,37 +0,0 @@ -builder: dnf -distro: Ultramarine Linux 40 Container (Development Tools) - -import: - - base-docker.yaml - -dnf: - releasever: 40 - arch: aarch64 -packages: - #releng and packaging - - katsu - - anda - - anda-mock-configs - - anda-srpm-macros - - libostree - - rpm-ostree - #languages - - vala - - rust - - python3 - - python3-pip - - nodejs - #hwe/anywhere - - vboot-utils - #gui - - libhelium - - libhelium-devel - - tau-helium - - tau-hydrogen - - gtk4-devel - - rust-gtk4-devel - #utils - - git - - micro - - nano - - vim diff --git a/katsu/modules/base/devtools-docker-x86_64.yaml b/katsu/modules/base/devtools-docker-x86_64.yaml deleted file mode 100644 index c312bd2..0000000 --- a/katsu/modules/base/devtools-docker-x86_64.yaml +++ /dev/null @@ -1,37 +0,0 @@ -builder: dnf -distro: Ultramarine Linux 40 Container (Development Tools) - -import: - - base-docker.yaml - -dnf: - releasever: 40 - arch: x86_64 -packages: - #releng and packaging - - katsu - - anda - - anda-mock-configs - - anda-srpm-macros - - libostree - - rpm-ostree - #languages - - vala - - rust - - python3 - - python3-pip - - nodejs - #hwe/anywhere - - vboot-utils - #gui - - libhelium - - libhelium-devel - - tau-helium - - tau-hydrogen - - gtk4-devel - - rust-gtk4-devel - #utils - - git - - micro - - nano - - vim From 85393128b506c96b5a0261b14ddab8cf916b52fb Mon Sep 17 00:00:00 2001 From: Cappy Ishihara Date: Thu, 18 Jul 2024 17:13:11 +0700 Subject: [PATCH 9/9] ci: make version into matrix --- .github/workflows/build-docker.yml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build-docker.yml b/.github/workflows/build-docker.yml index a98b4a1..44c759c 100644 --- a/.github/workflows/build-docker.yml +++ b/.github/workflows/build-docker.yml @@ -151,6 +151,8 @@ jobs: strategy: fail-fast: true matrix: + version: + - 40 dockerfile: - dockerfiles/devtools.dockerfile @@ -170,10 +172,10 @@ jobs: platforms: linux/amd64,linux/arm64 push: true tags: | - ghcr.io/ultramarine-linux/ultramarine-devtools:40 + ghcr.io/ultramarine-linux/ultramarine-devtools:${{ matrix.version }} ghcr.io/ultramarine-linux/ultramarine-devtools:latest build-args: | - RELEASE=40 + RELEASE=${{ matrix.version }} #### LIVE ISO ####