diff --git a/.github/workflows/build_docker.yml b/.github/workflows/build_docker.yml index 2e009f8..c435900 100644 --- a/.github/workflows/build_docker.yml +++ b/.github/workflows/build_docker.yml @@ -40,17 +40,23 @@ env: # TARI_BRANCH: development # TARI_BRANCH: stagenet DOCKER_IMAGE: minotari_text_explorer + DAYS_to_EXPIRE: 30 concurrency: group: ${{ github.workflow }}-${{ github.ref }} cancel-in-progress: true +permissions: {} + jobs: docker_build: name: Docker building strategy: fail-fast: false + permissions: + packages: write + runs-on: ubuntu-latest steps: @@ -59,6 +65,12 @@ jobs: with: path: tari-explorer + - name: Setup expiration for scheduled builds + if: ${{ github.event_name == 'schedule' && github.event.schedule == '05 00 * * *' }} + shell: bash + run: | + echo "EXPIRATION=${{ env.DAYS_to_EXPIRE }}d" >> $GITHUB_ENV + - name: Prep for branch shell: bash run: | @@ -114,6 +126,7 @@ jobs: ref: development sparse-checkout: | clients/nodejs/base_node_grpc_client/src/index.js + applications/minotari_app_grpc/proto/ sparse-checkout-cone-mode: false path: tari-project-tari @@ -123,6 +136,7 @@ jobs: run: | ls -alht cp -fv tari-project-tari/clients/nodejs/base_node_grpc_client/src/index.js tari-explorer/external_libs/base_node_grpc_client/src + cp -fvr tari-project-tari/applications/minotari_app_grpc/proto tari-explorer/external_libs/base_node_grpc_client/src/proto head -n15 tari-explorer/external_libs/base_node_grpc_client/src/index.js - name: Set up QEMU for Docker @@ -136,11 +150,6 @@ jobs: uses: docker/metadata-action@v5 with: images: | - #name/${{ env.DOCKER_IMAGE }} - #name/${{ github.repository }} - #ghcr.io/${{ github.repository }} - #ghcr.io/${{ github.repository_owner }}/${{ github.repository }} - #ghcr.io/${{ github.repository_owner }} ghcr.io/${{ github.repository_owner }}/${{ env.DOCKER_IMAGE }} ${{ secrets.DOCKER_PROVIDER }}/${{ secrets.DOCKER_REPO }}/${{ env.DOCKER_IMAGE }} tags: | @@ -152,8 +161,7 @@ jobs: type=sha labels: | maintainer=${{ github.actor }} - quay.expires-after=60d - #org.opencontainers.image.title=MyCustomTitle + quay.expires-after=${{ env.EXPIRATION }} org.opencontainers.image.description=Minotari Text Explorer org.opencontainers.image.vendor=TariLabs @@ -166,8 +174,6 @@ jobs: password: ${{ secrets.GITHUB_TOKEN }} - name: Login to Docker Image Provider - # Debug - # if: ${{ false }} uses: docker/login-action@v3 with: registry: ${{ secrets.DOCKER_PROVIDER }} diff --git a/.github/workflows/pr_signed_commits_check.yml b/.github/workflows/pr_signed_commits_check.yml new file mode 100644 index 0000000..cd72593 --- /dev/null +++ b/.github/workflows/pr_signed_commits_check.yml @@ -0,0 +1,24 @@ +--- +# Checks if the comments are signed or not +name: PR - Signed commits check + +'on': + pull_request_target + +concurrency: + # https://docs.github.com/en/actions/examples/using-concurrency-expressions-and-a-test-matrix + group: '${{ github.workflow }} @ ${{ github.event.pull_request.head.label || github.head_ref || github.ref }}' + cancel-in-progress: ${{ !startsWith(github.ref, 'refs/tags/v') || github.ref != 'refs/heads/development' || github.ref != 'refs/heads/nextnet' || github.ref != 'refs/heads/stagenet' }} + +permissions: {} + +jobs: + check-signed-commits: + name: Check signed commits in PR + runs-on: ubuntu-latest + permissions: + contents: read + pull-requests: write + steps: + - name: Check signed commits in PR + uses: 1Password/check-signed-commits-action@v1 diff --git a/Dockerfile b/Dockerfile index 1d6f148..99b80df 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,7 +1,7 @@ # syntax = docker/dockerfile:1.3 # https://hub.docker.com/_/node -ARG NODE_VERSION=16-bullseye-slim +ARG NODE_VERSION=22-bookworm-slim FROM node:$NODE_VERSION @@ -18,6 +18,8 @@ COPY --chown=node:node . . #RUN npm ci --only=production --omit=dev RUN npm install ${EXTERNAL_LIBS_LOCATION}/base_node_grpc_client/ RUN npm install +# Hack - bring proto files in +RUN cp -fvr ${EXTERNAL_LIBS_LOCATION}/base_node_grpc_client/proto node_modules/\@tariproject/base-node-grpc-client/proto #RUN npm install debug ENV BASE_NODE_PROTO=${BASE_NODE_PROTO}