Initial Commit #207
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: 000-Build-Docker-images | |
on: | |
push: | |
branches: [ "main" ] | |
paths: | |
- "**/000-setup/**" | |
pull_request: | |
branches: [ "main" ] | |
paths: | |
- "**/000-setup/**" | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
# Run only on the given folder | |
# defaults: | |
# run: | |
# working-directory: Labs/000-setup | |
strategy: | |
fail-fast: false | |
matrix: | |
platform: | |
- linux/amd64 | |
- linux/arm64 | |
- linux/arm/v6 | |
- linux/arm/v7 | |
- linux/arm/v8 | |
# Build the docker images for the setup process | |
steps: | |
- name: Prepare | |
run: | | |
platform=${{ matrix.platform }} | |
echo "PLATFORM_PAIR=${platform//\//-}" >> $GITHUB_ENV | |
# Add docker multi-platform build | |
- name: Set up qemu Action | |
uses: docker/setup-qemu-action@v3 | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v3 | |
- name: Login to Docker Hub | |
uses: docker/login-action@v3 | |
with: | |
username: ${{ secrets.DOCKERHUB_USERNAME }} | |
password: ${{ secrets.DOCKERHUB_TOKEN }} | |
- name: Check out the code | |
uses: actions/checkout@v4 | |
- name: docker-compose Build Action | |
run: COMPOSE_DOCKER_CLI_BUILD=1 DOCKER_BUILDKIT=1 docker compose -f Labs/000-setup/docker-compose-build.yaml build | |
- name: docker-compose Push Action | |
run: COMPOSE_DOCKER_CLI_BUILD=1 DOCKER_BUILDKIT=1 docker compose -f Labs/000-setup/docker-compose-build.yaml push | |