Skip to content

Commit

Permalink
Avoid the use of build args and try to correct for upload-artifact be…
Browse files Browse the repository at this point in the history
…havior
  • Loading branch information
WombatFromHell committed Jan 3, 2025
1 parent e5c98b2 commit 6345655
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 14 deletions.
3 changes: 1 addition & 2 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,9 @@ jobs:
chmod +x ./build.sh
export CI=${{ env.CI }}
./build.sh
cd ./target/appimage
- name: Upload Binary
uses: actions/upload-artifact@v4
with:
name: veridian-controller
path: veridian-controller_${{ steps.get_version.outputs.VERSION }}.tar.gz
path: ./target/appimage/veridian-controller_${{ steps.get_version.outputs.VERSION }}.tar.gz*
3 changes: 0 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,4 @@ RUN wget https://github.com/AppImage/AppImageKit/releases/download/continuous/ap
WORKDIR /app
COPY . /app/

ARG CI
ENV CI=$CI

ENTRYPOINT [ "/app/entrypoint.sh" ]
3 changes: 1 addition & 2 deletions build.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
#!/usr/bin/env bash

CI="${CI:-false}"
IMAGE_NAME="veridian"

selinux_status() {
Expand All @@ -23,7 +22,7 @@ fi
rm -rf ./target/appimage &&
mkdir -p ./target

docker build --build-arg CI="$CI" -t $IMAGE_NAME .
docker build -t $IMAGE_NAME .
docker run --rm \
-v "./target:/app/target${RELABEL}" \
--name $IMAGE_NAME $IMAGE_NAME
12 changes: 5 additions & 7 deletions entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,8 @@ echo "" && echo "AppImage release build created at: \"${full_versioned_path}\""
cd /app/target/appimage || exit
sha256sum "${versioned_path}" >"${versioned_path}.sha256"

if [[ "$CI" == false ]]; then
# package only when CI=false
mkdir -p /app/target/appimage/"${artifact_name}_${VERSION}"
cp -f /app/{LICENSE.md,README.md,nvidia-settings.sudoers,veridian-controller.service} /app/target/appimage/*.* ./"${artifact_name}_${VERSION}"
tar -cvzf veridian-controller_"${VERSION}".tar.gz ./"${artifact_name}_${VERSION}"
echo "" && echo "Release archive created at: \"${artifact_name_path}/${artifact_name}_${VERSION}.tar.gz\""
fi
mkdir -p /app/target/appimage/"${artifact_name}_${VERSION}"
cp -f /app/{LICENSE.md,README.md,nvidia-settings.sudoers,veridian-controller.service} /app/target/appimage/*.* ./"${artifact_name}_${VERSION}"
tar -cvzf veridian-controller_"${VERSION}".tar.gz ./"${artifact_name}_${VERSION}"
sha256sum ./"${artifact_name}_${VERSION}.tar.gz" >"${artifact_name}_${VERSION}.tar.gz.sha256"
echo "" && echo "Release archive created at: \"${artifact_name_path}\""

0 comments on commit 6345655

Please sign in to comment.