Skip to content

Try install docker on MacOS #10

Try install docker on MacOS

Try install docker on MacOS #10

Workflow file for this run

name: labs344-build
on:
workflow_dispatch:
push:
paths:
- containers/labs344/**
- .github/workflows/labs344-build.yml # Self-trigger
env:
REGISTRY: ghcr.io/bouncmpe
IMAGE_NAME: labs344
IMAGE_TAG: 2024-2025-1
jobs:
build:
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest]
runs-on: ${{ matrix.os }}
permissions:
contents: read
packages: write
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Install Docker if MacOS
uses: docker-practice/actions-setup-docker@master
timeout-minutes: 12
if: ${{ matrix.os == 'macos-latest' }}
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Log in to the registry
uses: docker/login-action@v3
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and push Docker image
uses: docker/build-push-action@v5
with:
context: containers/labs344
push: false
tags: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:latest,${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ env.IMAGE_TAG }}