Skip to content

Commit

Permalink
fix(docker): release image on stable, copy missing scripts and use fi…
Browse files Browse the repository at this point in the history
…xed version of ncr (#190)

* ci: do test on main and release docker on stable

* fix: copy more scripts in docker image and use fixed version of ncr

* fix(Dockerfile): ncr image resolution

* ci: run tests on PR to main and docker release on stable

* ci: remove dependency between jobs
  • Loading branch information
matteo-cristino authored Dec 20, 2024
1 parent b112cd0 commit c6683d1
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
7 changes: 5 additions & 2 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,20 +2,23 @@ on:
push:
branches:
- 'main'
- 'stable'
pull_request:
branches:
- 'main'
merge_group:

jobs:
api_test:
runs-on: ubuntu-latest
name: 🧪 VCI API Tests
if: github.event.pull_request.base.ref == 'main'
steps:
- uses: actions/checkout@v4
- run: make test

publish_docker_image:
needs: api_test
name: 🐳 Publish Docker Image
if: github.ref == 'refs/heads/main' && github.event_name != 'pull_request'
if: github.ref == 'refs/heads/stable'
uses: interfacerproject/workflows/.github/workflows/publish-ghcr.yml@main
secrets: inherit
5 changes: 4 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,11 +1,14 @@
FROM ghcr.io/forkbombeu/ncr:latest
FROM ghcr.io/forkbombeu/ncr@sha256:437b10cbc871a253baf5b387c72fde04f64e8e906e475b723936f5a857a5c32b

RUN apt update && apt install -y jq make && rm -rf /var/lib/apt/lists/*

WORKDIR /app

COPY --chmod=777 scripts/autorun_search.sh scripts/autorun_search.sh
COPY --chmod=777 scripts/autorun_store.sh scripts/autorun_store.sh
COPY --chmod=777 scripts/authorize.sh scripts/authorize.sh
COPY --chmod=777 scripts/up.sh scripts/up.sh

COPY Makefile Makefile

ENV FILES_DIR=.

0 comments on commit c6683d1

Please sign in to comment.