mirror of
https://github.com/irungentoo/toxcore.git
synced 2024-03-22 13:30:51 +08:00
chore: Only check the bootstrap daemon checksum on release.
It's pure toil until then. It's only interesting as part of the release checklist, not in regular PRs.
This commit is contained in:
parent
f70e588bc6
commit
8d29935b7a
3
.github/scripts/tox-bootstrapd-docker
vendored
3
.github/scripts/tox-bootstrapd-docker
vendored
|
@ -3,10 +3,11 @@
|
|||
set -exu -o pipefail
|
||||
|
||||
LOCAL="${1:-}"
|
||||
CHECK="${2:-}"
|
||||
|
||||
readarray -t FILES <<<"$(git ls-files)"
|
||||
|
||||
if ! tar c "${FILES[@]}" | docker build -f other/bootstrap_daemon/docker/Dockerfile -t toxchat/bootstrap-node - 2>&1 | tee docker-build.log; then
|
||||
if ! tar c "${FILES[@]}" | docker build --build-arg="CHECK=$CHECK" -f other/bootstrap_daemon/docker/Dockerfile -t toxchat/bootstrap-node - 2>&1 | tee docker-build.log; then
|
||||
grep -o "::error.*::[a-f0-9]* /usr/local/bin/tox-bootstrapd" docker-build.log
|
||||
false
|
||||
fi
|
||||
|
|
4
.github/workflows/docker.yml
vendored
4
.github/workflows/docker.yml
vendored
|
@ -25,7 +25,9 @@ jobs:
|
|||
with:
|
||||
submodules: recursive
|
||||
- name: Docker Build
|
||||
run: .github/scripts/tox-bootstrapd-docker local
|
||||
run: .github/scripts/tox-bootstrapd-docker local "$CHECK"
|
||||
env:
|
||||
CHECK: "${{ contains(github.event.pull_request.title, 'chore: Release ') && 'sha256sum' || 'echo' }}"
|
||||
- name: Push latest image to DockerHub
|
||||
if: ${{ github.event_name == 'push' }}
|
||||
run: docker push toxchat/bootstrap-node:latest
|
||||
|
|
|
@ -48,8 +48,9 @@ RUN CC=clang cmake -B_build -H. \
|
|||
# Verify checksum from dev-built binary, so we can be sure Docker Hub doesn't
|
||||
# mess with your binaries.
|
||||
COPY other/bootstrap_daemon/docker/tox-bootstrapd.sha256 other/bootstrap_daemon/docker/
|
||||
RUN SHA256="$(sha256sum /usr/local/bin/tox-bootstrapd)" && \
|
||||
(sha256sum -c other/bootstrap_daemon/docker/tox-bootstrapd.sha256 || \
|
||||
ARG CHECK=sha256sum
|
||||
RUN SHA256="$("$CHECK" /usr/local/bin/tox-bootstrapd)" && \
|
||||
("$CHECK" -c other/bootstrap_daemon/docker/tox-bootstrapd.sha256 || \
|
||||
(echo "::error file=other/bootstrap_daemon/docker/tox-bootstrapd.sha256,line=1::$SHA256" && \
|
||||
false))
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user