From 59c94463b03061ad6accccd9fb78b44e4e53cf74 Mon Sep 17 00:00:00 2001 From: madelen-at-work Date: Wed, 20 Mar 2024 10:36:26 +0100 Subject: [PATCH] combined update of depandabot recomendations --- .../actions/docker-build-action/action.yml | 6 ++--- .github/actions/metadata-action/action.yml | 2 +- .github/workflows/cd.yml | 20 +++++++-------- .github/workflows/lint.yml | 2 +- app/postinstallscript.sh | 11 ++++---- app/preuninstallscript.sh | 2 +- build.sh | 25 +++++++++---------- 7 files changed, 33 insertions(+), 35 deletions(-) diff --git a/.github/actions/docker-build-action/action.yml b/.github/actions/docker-build-action/action.yml index 79b389d..72a5e4b 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@v5 with: context: . push: false 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 2606158..df1728b 100644 --- a/.github/workflows/cd.yml +++ b/.github/workflows/cd.yml @@ -7,21 +7,21 @@ name: Sign and prerelease on: push: branches: - - 'main' + - "main" tags: # semver, e.g. 1.2.0 (does not match 0.1.2) - - '[1-9]+.[0-9]+.[0-9]+' + - "[1-9]+.[0-9]+.[0-9]+" # semver with prerelease info, e.g. 1.0.2-beta.1 or 1.2.3-rc.10 - - '[1-9]+.[0-9]+.[0-9]+-[a-z]+.[0-9]+' + - "[1-9]+.[0-9]+.[0-9]+-[a-z]+.[0-9]+" # do not match prerelease starting w/ 0, e.g. 1.0.2-beta.0 or 1.2.3-rc.01 - - '![1-9]+.[0-9]+.[0-9]+-[a-z]+.[0]*' + - "![1-9]+.[0-9]+.[0-9]+-[a-z]+.[0]*" # semver with date info, e.g. 1.0.2-20221125 - - '[1-9]+.[0-9]+.[0-9]+-[0-9]+' + - "[1-9]+.[0-9]+.[0-9]+-[0-9]+" # do not match date starting w/ 0, e.g. 1.0.2-01232023 - - '![1-9]+.[0-9]+.[0-9]+-[0]*' + - "![1-9]+.[0-9]+.[0-9]+-[0]*" pull_request: branches: - - 'main' + - "main" jobs: # Builds docker ACAP using the build.sh script, then signs the eap-file in @@ -43,8 +43,8 @@ jobs: uses: ./.github/actions/metadata-action with: suffix: -${{ matrix.arch }} - repository: 'docker-compose-acap' - get_version: 'true' + repository: "docker-compose-acap" + get_version: "true" - name: Update manifest file if: ( github.ref_type == 'tag') uses: ./.github/actions/update-acap-manifest-action @@ -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@v4 with: name: ${{ env.SIGNED_EAP_FILE }} path: build/${{ env.SIGNED_EAP_FILE }} 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 diff --git a/app/postinstallscript.sh b/app/postinstallscript.sh index 5544f7f..6143f46 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/sdkdockerdwrapperwithcompose.service << EOF +cat >>/etc/systemd/system/sdkdockerdwrapperwithcompose.service <