Skip to content

feat: add a second Dockerfile.bundled which bundles third-party binaries #14

feat: add a second Dockerfile.bundled which bundles third-party binaries

feat: add a second Dockerfile.bundled which bundles third-party binaries #14

Workflow file for this run

name: Build & publish docker image
on:
pull_request:
types:
- closed
branches:
- master
env:
REGISTRY: ghcr.io
jobs:
build:
if: github.event.pull_request.merged == true && startsWith(github.head_ref, 'release/')
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
strategy:
matrix:
include:
- dockerfile: Dockerfile
image: ghcr.io/joshstevens19/rindexer
- dockerfile: bundled.Dockerfile
image: ghcr.io/joshstevens19/rindexer-bundled
steps:
- name: Checkout repository
uses: actions/checkout@v4
# Login against a Docker registry
# https://github.com/docker/login-action
- name: Log into registry ${{ env.REGISTRY }}
uses: docker/login-action@v3
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
# Extract metadata (tags, labels) for Docker
# https://github.com/docker/metadata-action
- name: Extract Docker metadata
id: meta
uses: docker/metadata-action@v5
with:
images: ${{ matrix.image }}
tags: |
type=sha
type=sha,format=long
# set latest tag for default branch
type=raw,value=latest,enable={{is_default_branch}}
# Build and push Docker image with Buildx
# https://github.com/docker/build-push-action
- name: Build and push Docker image
uses: docker/build-push-action@v6
with:
context: .
file: ${{ matrix.dockerfile }}
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}