Build Drupal images #16
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| on: | |
| workflow_dispatch: | |
| inputs: | |
| environment: | |
| type: choice | |
| description: The environment | |
| options: | |
| - dev | |
| - prod | |
| name: Build Drupal images | |
| jobs: | |
| build-drupal-images: | |
| name: Build Drupal images | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Set up QEMU | |
| uses: docker/setup-qemu-action@v3 | |
| with: | |
| image: tonistiigi/binfmt:latest | |
| platforms: amd64,arm64 | |
| - name: Set up Docker Buildx | |
| uses: docker/setup-buildx-action@v3 | |
| - name: Run tests | |
| working-directory: drupal | |
| run: make test | |
| - name: Log in to registry | |
| run: echo "${{ secrets.GITHUB_TOKEN }}" | docker login ghcr.io -u ${{ github.actor }} --password-stdin | |
| - name: Build and push production image | |
| working-directory: drupal | |
| if: github.event.inputs.environment == 'prod' | |
| run: make push-prod | |
| - name: Build and push developer image | |
| working-directory: drupal | |
| if: github.event.inputs.environment == 'dev' | |
| run: make push-dev | |