From 43c7020eb7f5db42a13d69bef880ede0b6547435 Mon Sep 17 00:00:00 2001 From: Madelen Andersson Date: Thu, 7 Mar 2024 10:08:18 +0100 Subject: [PATCH 1/4] combined update of depenadbot recomendations --- .github/actions/metadata-action/action.yml | 2 +- .github/workflows/cd.yml | 4 ++-- .github/workflows/lint.yml | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/actions/metadata-action/action.yml b/.github/actions/metadata-action/action.yml index 78e44d1..2138e8c 100644 --- a/.github/actions/metadata-action/action.yml +++ b/.github/actions/metadata-action/action.yml @@ -44,7 +44,7 @@ runs: steps: - name: Create metadata for docker image id: meta - uses: docker/metadata-action@v4 + uses: docker/metadata-action@v5 with: images: ${{ inputs.repository }} # adds the suffix for all tags, even latest. diff --git a/.github/workflows/cd.yml b/.github/workflows/cd.yml index a18434b..c2aef62 100644 --- a/.github/workflows/cd.yml +++ b/.github/workflows/cd.yml @@ -91,7 +91,7 @@ jobs: echo "HTTP_RESPONSE is empty or not a valid integer: $HTTP_RESPONSE" fi - name: Upload artifact - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@4 with: name: ${{ env.SIGNED_EAP_FILE }} path: build/${{ env.SIGNED_EAP_FILE }} @@ -173,7 +173,7 @@ jobs: echo "::error::Non valid architecture '${{ matrix.arch }}' encountered" fi - name: Download artifacts - uses: actions/download-artifact@v3 + uses: actions/download-artifact@v4 with: name: ${{ env.EAP_FILE }} path: ./ diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 365cd7d..667f2b2 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -16,7 +16,7 @@ jobs: fetch-depth: 0 - name: Lint codebase - uses: super-linter/super-linter/slim@v5 + uses: super-linter/super-linter/slim@v6 env: VALIDATE_ALL_CODEBASE: true DEFAULT_BRANCH: main From 09e05c4d44ef8f7ed882de49e4dbc4446b81d6da Mon Sep 17 00:00:00 2001 From: Madelen Andersson Date: Thu, 7 Mar 2024 10:19:22 +0100 Subject: [PATCH 2/4] fixed typo --- .github/workflows/cd.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/cd.yml b/.github/workflows/cd.yml index c2aef62..130fc57 100644 --- a/.github/workflows/cd.yml +++ b/.github/workflows/cd.yml @@ -91,7 +91,7 @@ jobs: echo "HTTP_RESPONSE is empty or not a valid integer: $HTTP_RESPONSE" fi - name: Upload artifact - uses: actions/upload-artifact@4 + uses: actions/upload-artifact@v4 with: name: ${{ env.SIGNED_EAP_FILE }} path: build/${{ env.SIGNED_EAP_FILE }} From 6ca473ebace912dfdfa9425d7fd6c063bc996dba Mon Sep 17 00:00:00 2001 From: Madelen Andersson Date: Thu, 7 Mar 2024 11:36:25 +0100 Subject: [PATCH 3/4] update docker actions and lint fixes --- .../actions/docker-build-action/action.yml | 6 ++--- app/postinstallscript.sh | 9 ++++---- build.sh | 23 +++++++++---------- 3 files changed, 18 insertions(+), 20 deletions(-) diff --git a/.github/actions/docker-build-action/action.yml b/.github/actions/docker-build-action/action.yml index 79b389d..2d245e4 100644 --- a/.github/actions/docker-build-action/action.yml +++ b/.github/actions/docker-build-action/action.yml @@ -53,12 +53,12 @@ runs: using: composite steps: - name: Set up Docker buildx - uses: docker/setup-buildx-action@v2 + uses: docker/setup-buildx-action@v3 - name: Set up QEMU if: ${{ inputs.use_qemu == 'true'}} - uses: docker/setup-qemu-action@v2 + uses: docker/setup-qemu-action@v3 - name: Build image - uses: docker/build-push-action@v4 + uses: docker/build-push-action@v6 with: context: . push: false diff --git a/app/postinstallscript.sh b/app/postinstallscript.sh index 946b4f8..a771310 100644 --- a/app/postinstallscript.sh +++ b/app/postinstallscript.sh @@ -1,15 +1,14 @@ #!/bin/sh # Move the daemon.json file into localdata folder -if [ ! -e localdata/daemon.json ] -then - mv empty_daemon.json localdata/daemon.json +if [ ! -e localdata/daemon.json ]; then + mv empty_daemon.json localdata/daemon.json else - rm empty_daemon.json + rm empty_daemon.json fi # Make sure containerd is started before dockerd and set PATH -cat >> /etc/systemd/system/sdkdockerdwrapper.service << EOF +cat >>/etc/systemd/system/sdkdockerdwrapper.service < Date: Thu, 7 Mar 2024 11:38:47 +0100 Subject: [PATCH 4/4] version fix --- .github/actions/docker-build-action/action.yml | 2 +- app/postinstallscript.sh | 4 ++-- build.sh | 18 +++++++++--------- 3 files changed, 12 insertions(+), 12 deletions(-) diff --git a/.github/actions/docker-build-action/action.yml b/.github/actions/docker-build-action/action.yml index 2d245e4..72a5e4b 100644 --- a/.github/actions/docker-build-action/action.yml +++ b/.github/actions/docker-build-action/action.yml @@ -58,7 +58,7 @@ runs: if: ${{ inputs.use_qemu == 'true'}} uses: docker/setup-qemu-action@v3 - name: Build image - uses: docker/build-push-action@v6 + uses: docker/build-push-action@v5 with: context: . push: false diff --git a/app/postinstallscript.sh b/app/postinstallscript.sh index a771310..7030dd8 100644 --- a/app/postinstallscript.sh +++ b/app/postinstallscript.sh @@ -2,9 +2,9 @@ # Move the daemon.json file into localdata folder if [ ! -e localdata/daemon.json ]; then - mv empty_daemon.json localdata/daemon.json + mv empty_daemon.json localdata/daemon.json else - rm empty_daemon.json + rm empty_daemon.json fi # Make sure containerd is started before dockerd and set PATH diff --git a/build.sh b/build.sh index bfc00a2..888d980 100755 --- a/build.sh +++ b/build.sh @@ -2,20 +2,20 @@ case "${1:-}" in armv7hf | aarch64) ;; *) - # error - echo "Invalid argument '${1:-}', valid arguments are armv7hf or aarch64" - exit 1 - ;; + # error + echo "Invalid argument '${1:-}', valid arguments are armv7hf or aarch64" + exit 1 + ;; esac imagetag="${2:-docker-acap:1.0}" # Build and copy out the acap docker buildx build --build-arg ACAPARCH="$1" \ - --build-arg HTTP_PROXY="${HTTP_PROXY:-}" \ - --build-arg HTTPS_PROXY="${HTTPS_PROXY:-}" \ - --file Dockerfile \ - --no-cache \ - --tag "$imagetag" . + --build-arg HTTP_PROXY="${HTTP_PROXY:-}" \ + --build-arg HTTPS_PROXY="${HTTPS_PROXY:-}" \ + --file Dockerfile \ + --no-cache \ + --tag "$imagetag" . docker cp "$(docker create "$imagetag")":/opt/app/ ./build-"$1"