bee-queue / docker-arena

The official docker application for bee-queue arena.
17 stars 15 forks source link

Auto-update Docker image on new bull-arena release #246

Open Niek opened 3 years ago

Niek commented 3 years ago

The current version is almost a year old, would it be possible to auto-update the Docker image on new releases?

clouedoc commented 2 years ago

If I'm not wrong, I believe this should be done via GitHub actions. Also, hello Niek !

Niek commented 2 years ago

Yes, you can change the build action to run on workflow_dispatch and trigger it from the release workflow in the arena repo. Or you can make a workflow on a schedule to check e.g. daily for a new NPM version.

Let me know if you need help with a PR.

clouedoc commented 2 years ago

Guide

This step should be added in bee-queue/arena at the end of the release workflow.

    - name: Invoke workflow in another repo
      uses: benc-uk/workflow-dispatch@v1
      if: steps.commit.outputs.pushed == 'true'
      with:
        workflow: ${{ secrets.REPO_EVENT }}
        repo: ${{ secrets.REPO_NAME }}
        token: ${{ secrets.REPO_TOKEN }}

Taken from here

With secrets:

REPO_EVENT=Docker publish
REPO_NAME=bee-queue/docker-arena
REPO_TOKEN=<Manually Created PAT (see below)>

Conclusion

This issue should be moved to the arena repository 🤔 Dispatching a workflow release seems the best option to me, as it avoids wasting Actions minutes.

clouedoc commented 2 years ago

As a workaround, one can build the Docker image directly from GitHub:

services:
  arena:
    build: https://github.com/bee-queue/docker-arena.git#071cff0d28c06d2e66b5c11ce7d63125a7de2b1d # PR #244 with a fix for BullMQ
    restart: always
    depends_on:
      - redis
    ports:
      - 4567:4567
    volumes:
      - ./arena.json:/opt/arena/index.json