From 15c1cac7043698d29558adcc9a75fa3f36fca4d6 Mon Sep 17 00:00:00 2001 From: Peter Johanson Date: Tue, 25 Oct 2022 23:36:19 -0400 Subject: [PATCH 1/5] fix: Add git safe directory override. --- .github/workflows/containers.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/containers.yml b/.github/workflows/containers.yml index 9fa9429..491b2ae 100644 --- a/.github/workflows/containers.yml +++ b/.github/workflows/containers.yml @@ -356,6 +356,8 @@ jobs: - name: Create and run container from 'build' candidate image shell: bash run: docker run -d -it --name candidate ${{ env.docker-args }} ${{ steps.paths.outputs.build-candidate }} + - name: Fixes for git safety checks + run: git config --global --add safe.directory '*' - name: Test cmake run: cmake --version - name: Test python From 64526ce2de6934ebeb5c0abe763bdfcdd1f775f4 Mon Sep 17 00:00:00 2001 From: Peter Johanson Date: Tue, 25 Oct 2022 23:14:35 -0400 Subject: [PATCH 2/5] feat: Update to new Node 18 LTS version. --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 8153fe9..cf690c7 100644 --- a/Dockerfile +++ b/Dockerfile @@ -45,7 +45,7 @@ RUN \ apt-get -y update \ && apt-get -y install --no-install-recommends \ curl \ - && curl -sL https://deb.nodesource.com/setup_16.x | bash - \ + && curl -sL https://deb.nodesource.com/setup_18.x | bash - \ && apt-get -y update \ && apt-get -y install --no-install-recommends \ clang-format \ From 0793ce8183178cbaa22e1ce528b5686c111031a8 Mon Sep 17 00:00:00 2001 From: Peter Johanson Date: Wed, 26 Oct 2022 00:09:30 -0400 Subject: [PATCH 3/5] feat: Use `skopeo copy` to create multi-arch tags. * Avoid plain `docker tag` to create stable/versioned tags, as this creates single architecture image tags, instead of a new manifest list * Use `skopeo copy` instead for this! --- .github/workflows/containers.yml | 26 ++++++++++---------------- 1 file changed, 10 insertions(+), 16 deletions(-) diff --git a/.github/workflows/containers.yml b/.github/workflows/containers.yml index 491b2ae..2e6f774 100644 --- a/.github/workflows/containers.yml +++ b/.github/workflows/containers.yml @@ -560,6 +560,8 @@ jobs: - build - dev steps: + - name: Install skopeo + run: sudo apt-get install -y skopeo - name: Login to GitHub Container Registry id: ghcr-login uses: docker/login-action@v1 @@ -585,18 +587,11 @@ jobs: run: | REPOSITORY=zmk-${TARGET}-${ARCHITECTURE} - docker pull docker.io/${DHNS}/${REPOSITORY}:${CANDIDATE} - docker tag docker.io/${DHNS}/${REPOSITORY}:${CANDIDATE} docker.io/${DHNS}/${REPOSITORY}:${VERSIONS} - docker tag docker.io/${DHNS}/${REPOSITORY}:${CANDIDATE} docker.io/${DHNS}/${REPOSITORY}:${MAJOR_MINOR} - docker tag docker.io/${DHNS}/${REPOSITORY}:${CANDIDATE} ghcr.io/${GHCRNS}/${REPOSITORY}:${CANDIDATE} - docker tag docker.io/${DHNS}/${REPOSITORY}:${CANDIDATE} ghcr.io/${GHCRNS}/${REPOSITORY}:${VERSIONS} - docker tag docker.io/${DHNS}/${REPOSITORY}:${CANDIDATE} ghcr.io/${GHCRNS}/${REPOSITORY}:${MAJOR_MINOR} - docker push docker.io/${DHNS}/${REPOSITORY}:${CANDIDATE} - docker push docker.io/${DHNS}/${REPOSITORY}:${VERSIONS} - docker push docker.io/${DHNS}/${REPOSITORY}:${MAJOR_MINOR} - docker push ghcr.io/${GHCRNS}/${REPOSITORY}:${CANDIDATE} - docker push ghcr.io/${GHCRNS}/${REPOSITORY}:${VERSIONS} - docker push ghcr.io/${GHCRNS}/${REPOSITORY}:${MAJOR_MINOR} + skopeo copy --all docker://docker.io/${DHNS}/${REPOSITORY}:${CANDIDATE} docker://docker.io/${DHNS}/${REPOSITORY}:${VERSIONS} + skopeo copy --all docker://docker.io/${DHNS}/${REPOSITORY}:${CANDIDATE} docker://docker.io/${DHNS}/${REPOSITORY}:${MAJOR_MINOR} + skopeo copy --all docker://docker.io/${DHNS}/${REPOSITORY}:${CANDIDATE} docker://ghcr.io/${GHCRNS}/${REPOSITORY}:${CANDIDATE} + skopeo copy --all docker://docker.io/${DHNS}/${REPOSITORY}:${CANDIDATE} docker://ghcr.io/${GHCRNS}/${REPOSITORY}:${VERSIONS} + skopeo copy --all docker://docker.io/${DHNS}/${REPOSITORY}:${CANDIDATE} docker://ghcr.io/${GHCRNS}/${REPOSITORY}:${MAJOR_MINOR} git-tag: needs: - tags @@ -643,6 +638,8 @@ jobs: - build - dev steps: + - name: Install skopeo + run: sudo apt-get install -y skopeo - name: Login to GitHub Container Registry id: ghcr-login uses: docker/login-action@v1 @@ -666,10 +663,7 @@ jobs: run: | REPOSITORY=zmk-${TARGET}-${ARCHITECTURE} - docker pull docker.io/${DHNS}/${REPOSITORY}:${CANDIDATE} - docker tag docker.io/${DHNS}/${REPOSITORY}:${CANDIDATE} docker.io/${DHNS}/${REPOSITORY}:stable - - docker push docker.io/${DHNS}/${REPOSITORY}:stable + skopeo copy --all docker://docker.io/${DHNS}/${REPOSITORY}:${CANDIDATE} docker://docker.io/${DHNS}/${REPOSITORY}:stable stable-git-tag: needs: - tags From 2f5f1ed561aed48edbdf2253024d9193fe09af49 Mon Sep 17 00:00:00 2001 From: Peter Johanson Date: Fri, 28 Oct 2022 13:19:40 -0400 Subject: [PATCH 4/5] chore: Bump a ton of deps. --- .github/workflows/containers.yml | 38 ++++++++++++++++---------------- 1 file changed, 19 insertions(+), 19 deletions(-) diff --git a/.github/workflows/containers.yml b/.github/workflows/containers.yml index 2e6f774..0e9fa04 100644 --- a/.github/workflows/containers.yml +++ b/.github/workflows/containers.yml @@ -97,14 +97,14 @@ jobs: - name: Login to Docker Hub id: docker-hub-login if: ${{ env.docker-hub-credentials == 'true' }} - uses: docker/login-action@v1 + uses: docker/login-action@v2 with: username: ${{ secrets.DOCKER_HUB_USERNAME }} password: ${{ secrets.DOCKER_HUB_TOKEN }} - name: Login to GitHub Container Registry id: ghcr-login if: ${{ env.ghcr-credentials == 'true' }} - uses: docker/login-action@v1 + uses: docker/login-action@v2 with: registry: ghcr.io username: ${{ secrets.GHCR_USERNAME }} @@ -130,7 +130,7 @@ jobs: echo ::set-output name=major-minor-branch-upstream::docker.io/${NSU}/${REPOSITORY}:${MAJOR_MINOR_BRANCH} - name: Set up cache id: cache - uses: actions/cache@v2 + uses: actions/cache@v3 env: cache-name: dev-generic with: @@ -139,11 +139,11 @@ jobs: restore-keys: | ${{ runner.os }}/${{ env.cache-name }}/${{ github.run_id }} - name: Set up QEMU - uses: docker/setup-qemu-action@v1 + uses: docker/setup-qemu-action@v2 - name: Set up Docker Buildx uses: docker/setup-buildx-action@v1 - name: Build to local cache - uses: docker/build-push-action@v2 + uses: docker/build-push-action@v3 with: target: dev-generic platforms: linux/amd64,linux/arm64 @@ -160,7 +160,7 @@ jobs: cache-to: type=local,dest=${{ steps.paths.outputs.local-new }},mode=max - name: Push to registry cache if: ${{ env.docker-hub-credentials == 'true' }} - uses: docker/build-push-action@v2 + uses: docker/build-push-action@v3 with: target: dev-generic platforms: linux/amd64,linux/arm64 @@ -203,14 +203,14 @@ jobs: - name: Login to Docker Hub id: docker-hub-login if: ${{ env.docker-hub-credentials == 'true' }} - uses: docker/login-action@v1 + uses: docker/login-action@v2 with: username: ${{ secrets.DOCKER_HUB_USERNAME }} password: ${{ secrets.DOCKER_HUB_TOKEN }} - name: Login to GitHub Container Registry id: ghcr-login if: ${{ env.ghcr-credentials == 'true' }} - uses: docker/login-action@v1 + uses: docker/login-action@v2 with: registry: ghcr.io username: ${{ secrets.GHCR_USERNAME }} @@ -282,18 +282,18 @@ jobs: echo ::set-output name=list::${LIST} - name: Set up dev-generic cache id: dev-generic-cache - uses: actions/cache@v2 + uses: actions/cache@v3 env: cache-name: dev-generic with: path: ${{ steps.paths.outputs.dev-generic }} key: ${{ runner.os }}/${{ env.cache-name }}/${{ github.run_id }}/${{ needs.timestamp.outputs.timestamp }} - name: Set up QEMU - uses: docker/setup-qemu-action@v1 + uses: docker/setup-qemu-action@v2 - name: Set up Docker Buildx uses: docker/setup-buildx-action@v1 - name: Build and load 'build' candidate image - uses: docker/build-push-action@v2 + uses: docker/build-push-action@v3 with: target: build build-args: | @@ -314,7 +314,7 @@ jobs: cache-to: type=inline load: true - name: Build and load 'dev' candidate image - uses: docker/build-push-action@v2 + uses: docker/build-push-action@v3 with: target: dev build-args: | @@ -341,7 +341,7 @@ jobs: repository: ${{ env.zmk-repository }} ref: ${{ env.zmk-ref }} - name: Cache Zephyr modules - uses: actions/cache@v2 + uses: actions/cache@v3 env: cache-name: zephyr-modules with: @@ -437,7 +437,7 @@ jobs: run: docker stop candidate - name: Build and push 'build' candidate image (x86_64 and arm64) if: ${{ steps.docker-hub-login.outcome == 'success' }} - uses: docker/build-push-action@v2 + uses: docker/build-push-action@v3 with: target: build platforms: linux/amd64,linux/arm64 @@ -460,7 +460,7 @@ jobs: push: true - name: Build and push 'dev' candidate image (x86_64 + arm64) if: ${{ steps.docker-hub-login.outcome == 'success' }} - uses: docker/build-push-action@v2 + uses: docker/build-push-action@v3 with: target: dev platforms: linux/amd64,linux/arm64 @@ -564,14 +564,14 @@ jobs: run: sudo apt-get install -y skopeo - name: Login to GitHub Container Registry id: ghcr-login - uses: docker/login-action@v1 + uses: docker/login-action@v2 with: registry: ghcr.io username: ${{ secrets.GHCR_USERNAME }} password: ${{ secrets.GHCR_TOKEN }} - name: Login to Docker Hub id: docker-hub-login - uses: docker/login-action@v1 + uses: docker/login-action@v2 with: username: ${{ secrets.DOCKER_HUB_USERNAME }} password: ${{ secrets.DOCKER_HUB_TOKEN }} @@ -642,14 +642,14 @@ jobs: run: sudo apt-get install -y skopeo - name: Login to GitHub Container Registry id: ghcr-login - uses: docker/login-action@v1 + uses: docker/login-action@v2 with: registry: ghcr.io username: ${{ secrets.GHCR_USERNAME }} password: ${{ secrets.GHCR_TOKEN }} - name: Login to Docker Hub id: docker-hub-login - uses: docker/login-action@v1 + uses: docker/login-action@v2 with: username: ${{ secrets.DOCKER_HUB_USERNAME }} password: ${{ secrets.DOCKER_HUB_TOKEN }} From 0712f5046db110c04d811d725229c688e7ea0914 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 28 Oct 2022 18:06:14 +0000 Subject: [PATCH 5/5] build(deps): bump docker/setup-buildx-action from 1 to 2 Bumps [docker/setup-buildx-action](https://github.com/docker/setup-buildx-action) from 1 to 2. - [Release notes](https://github.com/docker/setup-buildx-action/releases) - [Commits](https://github.com/docker/setup-buildx-action/compare/v1...v2) --- updated-dependencies: - dependency-name: docker/setup-buildx-action dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] --- .github/workflows/containers.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/containers.yml b/.github/workflows/containers.yml index 0e9fa04..c610f9f 100644 --- a/.github/workflows/containers.yml +++ b/.github/workflows/containers.yml @@ -141,7 +141,7 @@ jobs: - name: Set up QEMU uses: docker/setup-qemu-action@v2 - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v1 + uses: docker/setup-buildx-action@v2 - name: Build to local cache uses: docker/build-push-action@v3 with: @@ -291,7 +291,7 @@ jobs: - name: Set up QEMU uses: docker/setup-qemu-action@v2 - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v1 + uses: docker/setup-buildx-action@v2 - name: Build and load 'build' candidate image uses: docker/build-push-action@v3 with: