Skip to content

Commit

Permalink
ci: Use separate script to pull container from docker hub
Browse files Browse the repository at this point in the history
  • Loading branch information
NickeZ committed Aug 19, 2024
1 parent a5afb4d commit 22ca579
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 8 deletions.
8 changes: 8 additions & 0 deletions .ci/pull-container
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#!/bin/bash

set -e

CONTAINER_REPO=shiftcrypto/firmware_v2
CONTAINER_VERSION=$(cat .containerversion)

docker pull $CONTAINER_REPO:$CONTAINER_VERSION
5 changes: 0 additions & 5 deletions .ci/run-container-ci
Original file line number Diff line number Diff line change
Expand Up @@ -29,11 +29,6 @@ CONTAINER_REPO=shiftcrypto/firmware_v2
CONTAINER_VERSION=$(cat .containerversion)
CONTAINER=$CONTAINER_REPO:${CONTAINER_VERSION}

if [ "$1" == "pull" ] ; then
docker pull "$CONTAINER"
exit 0
fi

WORKSPACE_DIR="$1"
if [ -z "${WORKSPACE_DIR}" ]; then
echo "Workspace dir path is empty."
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
fetch-tags: true
submodules: recursive
- name: Pull CI container image
run: ./.ci/run-container-ci pull
run: ./.ci/pull-container
- name: Run CI in container
env:
COMPARE_REV: ${{ github.event.before }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/pr-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
fetch-depth: 0

- name: Pull container image
run: ./.ci/run-container-ci pull
run: ./.ci/pull-container

- name: Run CI in container
env:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/prt-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ jobs:
git log -1 --format="Head %H, Parents %P"
- name: Pull container image
run: ./.ci/run-container-ci pull
run: ./.ci/pull-container

- name: Run CI in container
env:
Expand Down

0 comments on commit 22ca579

Please sign in to comment.