Skip to content

Commit

Permalink
fix: verify build on branches
Browse files Browse the repository at this point in the history
  • Loading branch information
dbcfd committed Feb 27, 2024
1 parent 0e8f930 commit 3ffff2f
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 5 deletions.
11 changes: 11 additions & 0 deletions .github/workflows/build-and-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -67,3 +67,14 @@ jobs:
- uses: mozilla-actions/[email protected]
- name: Build
run: make build
build-docker:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Publish
id: build
run: |
make build-docker
6 changes: 5 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -87,8 +87,12 @@ check-clippy:
run:
RUST_LOG=WARN,checkpointer=DEBUG $(CARGO) run --all-features --locked --release --bin checkpointer

.PHONY: build-docker
build-docker:
./ci-scripts/image.sh

.PHONY: publish-docker
publish-docker:
publish-docker: build-docker
./ci-scripts/publish.sh

.PHONY: schedule-ecs-deployment
Expand Down
5 changes: 5 additions & 0 deletions ci-scripts/image.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#!/usr/bin/env bash

# Build a docker image running checkpointer
docker buildx build --load -t 3box/checkpointer .
docker run --rm 3box/checkpointer ssh-check
5 changes: 1 addition & 4 deletions ci-scripts/publish.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/usr/bin/env bash

# Build and publish a docker image run running checkpointer
# Publish a docker image running checkpointer
#
# DOCKER_PASSWORD must be set
# Use:
Expand All @@ -9,9 +9,6 @@
# echo "${DOCKER_PASSWORD}" | docker login --username AWS --password-stdin public.ecr.aws/r5b3e0r5
#
# to login to docker. That password will be valid for 12h.

docker buildx build --load -t 3box/checkpointer .
docker run --rm 3box/checkpointer ssh-check
docker tag 3box/checkpointer:latest public.ecr.aws/r5b3e0r5/3box/checkpointer:latest

if [[ -n "$SHA" ]]; then
Expand Down

0 comments on commit 3ffff2f

Please sign in to comment.