Skip to content

Commit

Permalink
combined update of depandabot recomendations
Browse files Browse the repository at this point in the history
  • Loading branch information
madelen-at-work committed Mar 20, 2024
1 parent 76c84be commit 59c9446
Show file tree
Hide file tree
Showing 7 changed files with 33 additions and 35 deletions.
6 changes: 3 additions & 3 deletions .github/actions/docker-build-action/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion .github/actions/metadata-action/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
20 changes: 10 additions & 10 deletions .github/workflows/cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down Expand Up @@ -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 }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
11 changes: 5 additions & 6 deletions app/postinstallscript.sh
Original file line number Diff line number Diff line change
@@ -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 <<EOF
[Unit]
BindsTo=containerd.service
After=network-online.target containerd.service var-spool-storage-SD_DISK.mount
Expand All @@ -24,4 +23,4 @@ ln -s /usr/local/packages/dockerdwrapperwithcompose/docker /usr/local/bin/docker

# Create docker-compose symbolic link
mkdir -p /usr/local/lib/docker/cli-plugins
ln -s /usr/local/packages/dockerdwrapperwithcompose/docker-compose /usr/local/lib/docker/cli-plugins/docker-compose
ln -s /usr/local/packages/dockerdwrapperwithcompose/docker-compose /usr/local/lib/docker/cli-plugins/docker-compose
2 changes: 1 addition & 1 deletion app/preuninstallscript.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@
rm /usr/local/bin/docker

# Remove docker-compose symbolic link
rm /usr/local/lib/docker/cli-plugins/docker-compose
rm /usr/local/lib/docker/cli-plugins/docker-compose
25 changes: 12 additions & 13 deletions build.sh
Original file line number Diff line number Diff line change
@@ -1,22 +1,21 @@
#!/bin/sh -eu
case "${1:-}" in
armv7hf|aarch64)
;;
*)
# error
echo "Invalid argument '${1:-}', valid arguments are armv7hf or aarch64"
exit 1
;;
armv7hf | aarch64) ;;
*)
# error
echo "Invalid argument '${1:-}', valid arguments are armv7hf or aarch64"
exit 1
;;
esac

imagetag="${2:-docker-acap-with-compose:1.0}"

# Now build and copy out the acap
# 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"

0 comments on commit 59c9446

Please sign in to comment.