diff --git a/.github/workflows/build_images.yaml b/.github/workflows/build_images.yaml new file mode 100644 index 00000000..f79a122a --- /dev/null +++ b/.github/workflows/build_images.yaml @@ -0,0 +1,43 @@ +name: Build + +on: + push: + branches: + - 'master' + - 'feat/build_workflow' + +jobs: + build-and-push: + runs-on: ubuntu-latest + strategy: + matrix: + include: + - dockerfile: ./src/node/addon/Dockerfile + tag: gabisonfire/knightcrawler-addon:latest + - dockerfile: ./src/node/addon-jackett/Dockerfile + tag: gabisonfire/knightcrawler-addon-jackett:latest + - dockerfile: ./src/node/consumer/Dockerfile + tag: gabisonfire/knightcrawler-consumer:latest + - dockerfile: ./src/producer/Dockerfile + tag: gabisonfire/knightcrawler-producer:latest + steps: + - + name: Checkout repository + uses: actions/checkout@v4 + - + name: Set up Docker Buildx + uses: docker/setup-buildx-action@v3 + - + name: Login to Docker Hub + uses: docker/login-action@v3 + with: + username: ${{ vars.DOCKERHUB_USERNAME }} + password: ${{ secrets.DOCKERHUB_TOKEN }} + - + name: Build and push ${{ matrix.tag }} + uses: docker/build-push-action@v5 + with: + context: app + file: ${{ matrix.dockerfile }} + push: true + tags: ${{ matrix.tag }} \ No newline at end of file