Skip to content

Commit

Permalink
Merge pull request #1427 from tripal/tv4g0-issue1420-fixDockerBuild
Browse files Browse the repository at this point in the history
Update workflow to automatically build docker
  • Loading branch information
spficklin committed Feb 19, 2023
2 parents 3ce1761 + 3077697 commit 7d3796b
Showing 1 changed file with 44 additions and 13 deletions.
57 changes: 44 additions & 13 deletions .github/workflows/MAIN-buildDocker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,40 +2,71 @@ name: Build and Publish Docker image
on:
push:
branches:
- 9.x-4.x
- 4.x
- 4v40g-0-test-docker-build
- tv4g0-328-dockerUpdateLatestTag
- tv4g0-issue1420-fixDockerBuild

jobs:
push_to_registry:
runs-on: ubuntu-latest
continue-on-error: true
strategy:
fail-fast: false
matrix:
drupalversion: ['9.3.x-dev', '9.4.x-dev', '9.5.x-dev']
continue-on-error: true
name: Docker Build (drupal${{ matrix.drupalversion }})
php-version:
- "8.0"
- "8.1"
pgsql-version:
- "13"
drupal-version:
- "9.2.x-dev"
- "9.3.x-dev"
- "9.4.x-dev"
- "9.5.x-dev"
- "10.0.x-dev"
exclude:
- php-version: "8.0"
pgsql-version: "13"
drupal-version: "10.0.x-dev"
- php-version: "8.1"
pgsql-version: "13"
drupal-version: "9.2.x-dev"
name: Docker Build (drupal${{ matrix.drupal-version }})
steps:
- uses: actions/checkout@v2
name: Check out code
- uses: mr-smithers-excellent/docker-build-push@v5
name: Build & push Docker image
name: Build & push Docker image (PHP 8.1 + PgSQL 13)
if: ${{ matrix.php-version == '8.1' && matrix.pgsql-version == '13'}}
with:
image: tripalproject/tripaldocker
tags: drupal${{ matrix.drupal-version }}, drupal${{ matrix.drupal-version }}-php8.1-pgsql13
dockerfile: tripaldocker/Dockerfile-php8.1-pgsql13
registry: docker.io
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_PASSWORD }}
buildArgs: "drupalversion=${{ matrix.drupal-version }}"
labels: 'tripal.branch=4.x,drupal.version.label="${{ matrix.label }}",php.version.label="8.1", postgresql.version.label="13"'
- uses: mr-smithers-excellent/docker-build-push@v5
name: Build & push Docker image (PHP 8.0 + PgSQL 13)
if: ${{ matrix.php-version == '8.0' && matrix.pgsql-version == '13'}}
with:
image: tripalproject/tripaldocker
tags: drupal${{ matrix.drupalversion }}
tags: drupal${{ matrix.drupal-version }}-php8.0-pgsql13
dockerfile: tripaldocker/Dockerfile-php8-pgsql13
registry: docker.io
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_PASSWORD }}
buildArgs: "drupalversion=${{ matrix.drupalversion }}"
labels: 'tripal.branch=9.x-4.x,drupal.version.label="${{ matrix.label }}"'
buildArgs: "drupalversion=${{ matrix.drupal-version }}"
labels: 'tripal.branch=4.x,drupal.version.label="${{ matrix.label }}",php.version.label="8.0", postgresql.version.label="13"'
- uses: mr-smithers-excellent/docker-build-push@v5
name: Build latest using 9.4.x-dev
if: ${{ matrix.drupalversion == '9.4.x-dev' }}
name: Build latest using 9.5.x-dev, PHP 8.1, PgSQL 13
if: ${{ matrix.drupal-version == '9.5.x-dev' && matrix.php-version == '8.1' && matrix.pgsql-version == '13'}}
with:
image: tripalproject/tripaldocker
tags: latest
registry: docker.io
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_PASSWORD }}
buildArgs: "drupalversion=${{ matrix.drupalversion }}"
labels: 'tripal.branch=9.x-4.x,drupal.version.label="${{ matrix.drupalversion }}"'
buildArgs: "drupalversion=${{ matrix.drupal-version }}"
labels: 'tripal.branch=4.x,drupal.version.label="${{ matrix.drupal-version }}",php.version.label="${{ matrix.php-version }}", postgresql.version.label="${{ matrix.pgsql-version }}"'

0 comments on commit 7d3796b

Please sign in to comment.