Support hash-only build paths #15
Workflow file for this run
This file contains 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
name: "Test build Docker image" | |
env: | |
DEFAULT_PYTHON_VERSION: "3.10" | |
FORCE_COLOR: "1" # Make tools pretty. | |
on: | |
pull_request: | |
push: | |
branches: | |
- main | |
# ensuring only one instance is running at a given time | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref }} | |
cancel-in-progress: true | |
jobs: | |
build-docker-image: | |
name: "Build docker images" | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
docker-image: | |
- conda-store | |
- conda-store-server | |
steps: | |
- name: "Checkout Repository 🛎" | |
uses: actions/checkout@v4 | |
- name: "Set up Docker Buildx" | |
uses: docker/setup-buildx-action@v3 | |
- name: "Lint Dockerfiles 🔍" | |
uses: jbergstroem/hadolint-gh-action@v1 | |
with: | |
dockerfile: ${{ matrix.docker-image }}/Dockerfile | |
output_format: tty | |
error_level: 0 | |
- name: "Docker Meta" | |
id: meta | |
uses: docker/metadata-action@v5 | |
with: | |
images: | | |
quansight/${{ matrix.docker-image }} | |
tags: | | |
type=sha | |
- name: "Build Docker images" | |
uses: docker/build-push-action@v5 | |
with: | |
context: "${{ matrix.docker-image }}" | |
file: "${{ matrix.docker-image }}/Dockerfile" | |
tags: | | |
${{ steps.meta.outputs.tags }} | |
target: "dev" | |
push: false | |
labels: ${{ steps.meta.outputs.labels }} | |
cache-from: type=gha | |
cache-to: type=gha,mode=max |