Skip to content

Commit

Permalink
Merge pull request #14 from code0-tech/drop-versions-from-image-name
Browse files Browse the repository at this point in the history
Drop versions from image names
  • Loading branch information
Taucher2003 authored May 19, 2024
2 parents 69f9e3e + 8021a32 commit 8d0fcdf
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 10 deletions.
18 changes: 12 additions & 6 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,15 @@ jobs:
strategy:
fail-fast: false
matrix:
image:
- asdf
- node-20.13-playwright
- ruby-3.2.2-postgres-16.1
include:
- image: asdf
tag_suffix: ''
- image: node-playwright
tag_suffix: '-node-20.13'
args: '--build-arg NODE_VERSION=20.13.1'
- image: ruby-postgres
tag_suffix: '-ruby-3.2.2-postgres-16.1'
args: '--build-arg RUBY_VERSION=3.2.2 --build-arg POSTGRES_VERSION=16.1'

steps:
- uses: actions/checkout@v4
Expand All @@ -33,12 +38,13 @@ jobs:
- '.github/workflows/build.yml'
- run: >-
docker build
-t ghcr.io/code0-tech/build-images/${{ matrix.image }}:${{ github.run_number }}.${{ github.run_attempt }}
-t ghcr.io/code0-tech/build-images/${{ matrix.image }}:${{ github.run_number }}.${{ github.run_attempt }}${{ matrix.tag_suffix }}
-f build-images/${{ matrix.image }}.Dockerfile
${{ matrix.args }}
.
if: steps.filter.outputs.image == 'true'
- run: echo ${{ secrets.GITHUB_TOKEN }} | docker login -u $ --password-stdin ghcr.io
name: Login to registry
if: ${{ (github.event_name == 'push' && steps.filter.outputs.image == 'true') || github.event_name == 'workflow_dispatch' }}
- run: docker push ghcr.io/code0-tech/build-images/${{ matrix.image }}:${{ github.run_number }}.${{ github.run_attempt }}
- run: docker push ghcr.io/code0-tech/build-images/${{ matrix.image }}:${{ github.run_number }}.${{ github.run_attempt }}${{ matrix.tag_suffix }}
if: ${{ (github.event_name == 'push' && steps.filter.outputs.image == 'true') || github.event_name == 'workflow_dispatch' }}
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,6 @@ SHELL ["/usr/bin/bash", "-lc"]

RUN asdf plugin add nodejs https://github.com/asdf-vm/asdf-nodejs.git

RUN asdf install nodejs 20.13.1
RUN asdf shell nodejs 20.13.1 && npx playwright install-deps && npx playwright install
ARG NODE_VERSION
RUN asdf install nodejs $NODE_VERSION
RUN asdf shell nodejs $NODE_VERSION && npx playwright install-deps && npx playwright install
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,7 @@ RUN apt-get update && apt-get install \
RUN asdf plugin add ruby https://github.com/asdf-vm/asdf-ruby.git
RUN asdf plugin add postgres https://github.com/smashedtoatoms/asdf-postgres.git

RUN asdf install ruby 3.2.2
RUN POSTGRES_EXTRA_CONFIGURE_OPTIONS="--without-icu" POSTGRES_SKIP_INITDB=true asdf install postgres 16.1
ARG RUBY_VERSION
RUN asdf install ruby $RUBY_VERSION
ARG POSTGRES_VERSION
RUN POSTGRES_EXTRA_CONFIGURE_OPTIONS="--without-icu" POSTGRES_SKIP_INITDB=true asdf install postgres $POSTGRES_VERSION

0 comments on commit 8d0fcdf

Please sign in to comment.