Skip to content

Commit

Permalink
refactored to be more flexible
Browse files Browse the repository at this point in the history
  • Loading branch information
andlinger committed Feb 9, 2024
1 parent ebccec6 commit ca74ed1
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 9 deletions.
14 changes: 8 additions & 6 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@ on: push
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
version: [ "6", "6.0","6.0.6", "6.0.10", "6.0.12", "6.0.13", "7", "7.0", "7.0.5" ]
steps:
- name: Git checkout
uses: actions/checkout@v3
Expand All @@ -28,14 +31,13 @@ jobs:
- name: Build and push
uses: docker/build-push-action@v4
with:
context: ./6.0
platforms: linux/amd64,linux/arm64
tags: i15s/mongo:6.0.6,i15s/mongo:6.0,i15s/mongo:6
tags: i15s/mongo:${{ matrix.version }}
push: true
build-args: |
VERSION=${{ matrix.version }}
- name: Push image to GitHub container registry
run: |
docker buildx imagetools create \
--tag ghcr.io/instant-solutions/mongo:6.0.6 \
--tag ghcr.io/instant-solutions/mongo:6.0 \
--tag ghcr.io/instant-solutions/mongo:6 \
i15s/mongo:6.0.6
--tag ghcr.io/instant-solutions/mongo:${{ matrix.version }} \
i15s/mongo:${{ matrix.version }}
7 changes: 4 additions & 3 deletions 6.0/Dockerfile → Dockerfile
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
FROM mongo:6.0.6
LABEL authors="instant:solutions OG"

ARG HEALTHCHECK_VERSION=1.0.0
ARG TARGETOS
ARG TARGETARCH
ARG VERSION

FROM mongo:${VERSION}
LABEL authors="instant:solutions OG"

ADD --chown=1000:1000 https://github.com/instant-solutions/mongo-healthcheck/releases/download/${HEALTHCHECK_VERSION}/mongo-healthcheck-${HEALTHCHECK_VERSION}-${TARGETOS}-${TARGETARCH}.tar.gz /tmp/healthcheck.tar.gz
RUN tar -xf /tmp/healthcheck.tar.gz -C /usr/bin/ \
Expand Down

0 comments on commit ca74ed1

Please sign in to comment.