Skip to content

test

test #31

Workflow file for this run

name: Test build
on: push
jobs:
detect-changes:
runs-on: ubuntu-latest
outputs:
# Expose matched filters as job 'variants' output variable
image_variants: ${{ steps.filter.outputs.changes }}
steps:
- uses: actions/checkout@v3
- uses: dorny/paths-filter@v2
# https://github.com/marketplace/actions/paths-changes-filter#conditional-execution
id: filter
with:
# detect changes against last commit
base: ${{ github.ref }}
filters: |
Dockerfile: Dockerfile
Dockerfile-deb: Dockerfile-deb
build:
needs: detect-changes
name: Setup, Build
runs-on: ubuntu-latest
continue-on-error: true
if : ${{ needs.detect-changes.outputs.image_variants != '[]' }}
strategy:
max-parallel: 6
# select a core set of images to build
matrix:
IMAGE_VARIANT: ${{ fromJSON(needs.detect-changes.outputs.image_variants) }}
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Build
uses: docker/build-push-action@v5
with:
context: .
file: ${{ matrix.IMAGE_VARIANT }}
tags: quota-microservices:latest
push: false
cache-from: type=gha
cache-to: type=gha,mode=max
- name: Extract built package
uses: shrink/actions-docker-extract@v3
id: extract
with:
image: quota-microservices:latest
path: /output/.
destination: output
# Archive the built package
- name: Archive artifacts
uses: actions/upload-artifact@v4
with:
name: compiled-artifacts
path: output