feat(stages)!: staged builds for images, will pull existing images if no diff #78
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: Build, test, and push Docker Images | |
on: | |
push: | |
branches: | |
- "master" | |
paths: | |
- ".github/workflows/docker.yml" | |
- "images/**" | |
- "!images/*/README.md" | |
- "tests/**" | |
- "!tests/README.md" | |
- "requirements-dev.txt" | |
pull_request: | |
paths: | |
- ".github/workflows/docker.yml" | |
- "images/**" | |
- "!images/*/README.md" | |
- "tests/**" | |
- "!tests/README.md" | |
- "requirements-dev.txt" | |
jobs: | |
vars: | |
runs-on: ubuntu-latest | |
outputs: | |
REGISTRY_NAME: "k8scc01covidacr" | |
DEV_REGISTRY_NAME: "k8scc01covidacrdev" | |
steps: | |
- name: Set up environment | |
run: echo "Environment has been set up." | |
base-cpu: | |
needs: [vars] | |
uses: ./.github/workflows/docker-steps.yaml | |
with: | |
image: "base-cpu" | |
base-image: "quay.io/jupyter/datascience-notebook:2024-06-17" | |
registry-name: "${{ needs.vars.outputs.DEV_REGISTRY_NAME }}" | |
secrets: | |
REGISTRY_USERNAME: ${{ secrets.DEV_REGISTRY_USERNAME }} | |
REGISTRY_PASSWORD: ${{ secrets.DEV_REGISTRY_PASSWORD }} | |
base-kubeflow: | |
needs: [vars, base-cpu] | |
uses: ./.github/workflows/docker-steps.yaml | |
with: | |
image: "base-kubeflow" | |
parent-image: "base-cpu" | |
parent-image-is-diff: "${{ needs.base-cpu.outputs.is-diff }}" | |
registry-name: "${{ needs.vars.outputs.DEV_REGISTRY_NAME }}" | |
secrets: | |
REGISTRY_USERNAME: ${{ secrets.DEV_REGISTRY_USERNAME }} | |
REGISTRY_PASSWORD: ${{ secrets.DEV_REGISTRY_PASSWORD }} |